diff options
author | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2018-05-23 13:21:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-23 13:21:31 -0400 |
commit | 3ea1a7062ffcfd05c6e5e6fe2a9a96537ba8630a (patch) | |
tree | 7ec3dbf958bf998e03c0c1099889f5e0e52f4462 /platform/darwin/src/NSExpression+MGLAdditions.mm | |
parent | 464fefab18822fff692cdcd97524100f81a200df (diff) | |
download | qtlocation-mapboxgl-3ea1a7062ffcfd05c6e5e6fe2a9a96537ba8630a.tar.gz |
[ios, macos] Fix keypath expressions, json object is parsed incorrectly for nested keypaths. (#11959)
* [ios, macos] Fix keypath expressions, a json object is parsed incorrectly for nested keypaths.
* [ios, macos] Update changelogs.
Diffstat (limited to 'platform/darwin/src/NSExpression+MGLAdditions.mm')
-rw-r--r-- | platform/darwin/src/NSExpression+MGLAdditions.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/darwin/src/NSExpression+MGLAdditions.mm index af4a197662..653e3d67e6 100644 --- a/platform/darwin/src/NSExpression+MGLAdditions.mm +++ b/platform/darwin/src/NSExpression+MGLAdditions.mm @@ -1070,7 +1070,8 @@ NSArray *MGLSubexpressionsWithJSONObjects(NSArray *objects) { case NSKeyPathExpressionType: { NSArray *expressionObject; - for (NSString *pathComponent in self.keyPath.pathComponents.reverseObjectEnumerator) { + NSArray *keyPath = [self.keyPath componentsSeparatedByString:@"."]; + for (NSString *pathComponent in keyPath) { if (expressionObject) { expressionObject = @[@"get", pathComponent, expressionObject]; } else { |