[core] Convert null to empty string, not “null”
This commit is contained in:
committed by
Minh Nguyễn
parent
0d067e3925
commit
4b1530ff42
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user