Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
Properly encode Array of GeoPoints (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
dplewis authored Sep 10, 2019
1 parent 6a6c690 commit 9fa0fb7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/ParseLiveQuery/Internal/QueryEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ extension Dictionary where Key: ExpressibleByStringLiteral, Value: AnyObject {
}
}
encodedQueryDictionary[key] = queries as? Value
} else if let geoPoints = val as? [PFGeoPoint] {
var points:[Value] = []
for point in geoPoints {
points.append(point.encodedDictionary as! Value)
}
encodedQueryDictionary[key] = points as? Value
} else if let dict = val as? [String:AnyObject] {
encodedQueryDictionary[key] = dict.encodedQueryDictionary as? Value
} else if let geoPoint = val as? PFGeoPoint {
Expand Down

0 comments on commit 9fa0fb7

Please sign in to comment.