From 20adb486f7d6bee54e13913cbd658e18da79029d Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 13 Sep 2018 10:14:31 -0700 Subject: [core] Make "to-number" of null behave as documented --- src/mbgl/style/expression/coercion.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mbgl') diff --git a/src/mbgl/style/expression/coercion.cpp b/src/mbgl/style/expression/coercion.cpp index 2481444dc4..187cdd48a4 100644 --- a/src/mbgl/style/expression/coercion.cpp +++ b/src/mbgl/style/expression/coercion.cpp @@ -10,6 +10,7 @@ namespace expression { EvaluationResult toNumber(const Value& v) { optional result = v.match( + [](NullValue) -> optional { return 0.0; }, [](const double f) -> optional { return f; }, [](const std::string& s) -> optional { try { -- cgit v1.2.1