diff --git a/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/darwin/src/NSExpression+MGLAdditions.mm index 1918dbaa3e4..93729f1bdfc 100644 --- a/platform/darwin/src/NSExpression+MGLAdditions.mm +++ b/platform/darwin/src/NSExpression+MGLAdditions.mm @@ -1056,7 +1056,7 @@ - (id)mgl_jsonExpressionObject { case NSFunctionExpressionType: { NSString *function = self.function; - BOOL hasCollectionProperty = !( ! [self.arguments.firstObject isKindOfClass: [self class]] || self.arguments.firstObject.expressionType == NSConstantValueExpressionType || self.arguments.firstObject.expressionType == NSKeyPathExpressionType + BOOL hasCollectionProperty = !( ! [self.arguments.firstObject isKindOfClass: [NSExpression class]] || self.arguments.firstObject.expressionType == NSConstantValueExpressionType || self.arguments.firstObject.expressionType == NSKeyPathExpressionType || self.arguments.firstObject.expressionType == NSVariableExpressionType ); NSString *op = MGLExpressionOperatorsByFunctionNames[function];