summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2018-09-13 10:14:31 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2018-09-13 15:55:34 -0700
commit20adb486f7d6bee54e13913cbd658e18da79029d (patch)
treeb5a56696c55afbff63d18c5007541ae7be8de18b
parentb64b4cd1f7a2716ca1aa6e1745f114e0fabfbcf6 (diff)
downloadqtlocation-mapboxgl-20adb486f7d6bee54e13913cbd658e18da79029d.tar.gz
[core] Make "to-number" of null behave as documented
m---------mapbox-gl-js0
-rw-r--r--platform/node/test/ignores.json1
-rw-r--r--src/mbgl/style/expression/coercion.cpp1
3 files changed, 2 insertions, 0 deletions
diff --git a/mapbox-gl-js b/mapbox-gl-js
-Subproject bb5806e2b5996dcebf006e9b0334255c5acb4db
+Subproject f66cead4b8f95c696d7d2636f36cafaf4a4c6bc
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<double> result = v.match(
+ [](NullValue) -> optional<double> { return 0.0; },
[](const double f) -> optional<double> { return f; },
[](const std::string& s) -> optional<double> {
try {