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