From 8e9ddfdba2affbecac1a19f6fde3273917110397 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 --- mapbox-gl-js | 2 +- platform/node/test/ignores.json | 1 + src/mbgl/style/expression/coercion.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mapbox-gl-js b/mapbox-gl-js index bb5806e2b5..f66cead4b8 160000 --- a/mapbox-gl-js +++ b/mapbox-gl-js @@ -1 +1 @@ -Subproject commit bb5806e2b5996dcebf006e9b0334255c5acb4db9 +Subproject commit f66cead4b8f95c696d7d2636f36cafaf4a4c6bc3 diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json index 0d1fe3268a..4351629299 100644 --- a/platform/node/test/ignores.json +++ b/platform/node/test/ignores.json @@ -112,6 +112,7 @@ "render-tests/regressions/mapbox-gl-js#6655": "skip - port https://github.com/mapbox/mapbox-gl-js/pull/6263 - needs issue", "render-tests/regressions/mapbox-gl-js#6706": "https://github.com/mapbox/mapbox-gl-native/issues/10619", "render-tests/regressions/mapbox-gl-js#6806": "pending https://github.com/mapbox/mapbox-gl-js/pull/6812", + "render-tests/regressions/mapbox-gl-js#7271": "https://github.com/mapbox/mapbox-gl-native/issues/12888", "render-tests/regressions/mapbox-gl-native#7357": "https://github.com/mapbox/mapbox-gl-native/issues/7357", "render-tests/runtime-styling/image-add-sdf": "https://github.com/mapbox/mapbox-gl-native/issues/9847", "render-tests/runtime-styling/paint-property-fill-flat-to-extrude": "https://github.com/mapbox/mapbox-gl-native/issues/6745", 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