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 13:58:20 -0700
commit8e9ddfdba2affbecac1a19f6fde3273917110397 (patch)
treedf3fee8e2e4b79f2622288297d235adaf6b329cd
parent01e908b43ad75fb81fe191034097a564cb5d8839 (diff)
downloadqtlocation-mapboxgl-8e9ddfdba2affbecac1a19f6fde3273917110397.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 {