summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mbgl/style/conversion/filter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mbgl/style/conversion/filter.cpp b/src/mbgl/style/conversion/filter.cpp
index f3e7050ccc..0a10d1e80a 100644
--- a/src/mbgl/style/conversion/filter.cpp
+++ b/src/mbgl/style/conversion/filter.cpp
@@ -53,9 +53,14 @@ bool isExpression(const Convertible& filter) {
optional<std::string> operand = toString(arrayMember(filter, 1));
return operand && *operand != "$id" && *operand != "$type";
- } else if (*op == "in" || *op == "!in" || *op == "!has" || *op == "none") {
+ } else if (*op == "!in" || *op == "!has" || *op == "none") {
return false;
+ } else if (*op == "in") {
+ optional<std::string> str = toString(arrayMember(filter, 1));
+
+ return arrayLength(filter) >= 3 && (!str || isArray(arrayMember(filter, 2)));
+
} else if (*op == "==" || *op == "!=" || *op == ">" || *op == ">=" || *op == "<" || *op == "<=") {
return arrayLength(filter) != 3 || isArray(arrayMember(filter, 1)) || isArray(arrayMember(filter, 2));