summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-05-14 12:18:13 -0700
committerMinh Nguyễn <mxn@1ec5.org>2018-05-14 13:24:42 -0700
commit4b1530ff422d9ba77ddb9ef34d64c2e04f356380 (patch)
treec9b1ae32ca0257d485eec258492f2cc40cb650ed /src
parent0d067e39253813b07c421a1c0a21c57a775fd8ec (diff)
downloadqtlocation-mapboxgl-4b1530ff422d9ba77ddb9ef34d64c2e04f356380.tar.gz
[core] Convert null to empty string, not “null”
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/expression/compound_expression.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mbgl/style/expression/compound_expression.cpp b/src/mbgl/style/expression/compound_expression.cpp
index 3bd8a836df..4739d50168 100644
--- a/src/mbgl/style/expression/compound_expression.cpp
+++ b/src/mbgl/style/expression/compound_expression.cpp
@@ -303,6 +303,7 @@ std::unordered_map<std::string, CompoundExpressionRegistry::Definition> initiali
define("to-string", [](const Value& value) -> Result<std::string> {
return value.match(
+ [](const NullValue&) -> Result<std::string> { return std::string(); },
[](const Color& c) -> Result<std::string> { return c.stringify(); }, // avoid quoting
[](const std::string& s) -> Result<std::string> { return s; }, // avoid quoting
[](const auto& v) -> Result<std::string> { return stringify(v); }