summaryrefslogtreecommitdiff
path: root/include/mbgl/style/conversion/property_value.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/style/conversion/property_value.hpp')
-rw-r--r--include/mbgl/style/conversion/property_value.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/mbgl/style/conversion/property_value.hpp b/include/mbgl/style/conversion/property_value.hpp
index 840643abbe..de95b56155 100644
--- a/include/mbgl/style/conversion/property_value.hpp
+++ b/include/mbgl/style/conversion/property_value.hpp
@@ -13,7 +13,9 @@ template <class T>
struct Converter<PropertyValue<T>> {
template <class V>
Result<PropertyValue<T>> operator()(const V& value) const {
- if (isObject(value)) {
+ if (isUndefined(value)) {
+ return {};
+ } else if (isObject(value)) {
Result<Function<T>> function = convert<Function<T>>(value);
if (!function) {
return function.error();