From 650a23163b0c9d5feedf5e6a321a0cd664494402 Mon Sep 17 00:00:00 2001 From: jmkiley Date: Thu, 19 Sep 2019 15:16:19 -0700 Subject: [PATCH] [ios] Add type check --- platform/darwin/src/NSExpression+MGLAdditions.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {