summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/style/expression/format_section_override.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/mbgl/style/expression/format_section_override.hpp b/include/mbgl/style/expression/format_section_override.hpp
index 7dc3a8dbb4..63382fda51 100644
--- a/include/mbgl/style/expression/format_section_override.hpp
+++ b/include/mbgl/style/expression/format_section_override.hpp
@@ -27,7 +27,11 @@ public:
return section.at(propertyName);
}
}
- return defaultValue.evaluate(*context.feature, *context.zoom, T());
+
+ return defaultValue.match(
+ [&context] (const style::PropertyExpression<T>& e) { return e.getExpression().evaluate(context); },
+ [] (const T& t) -> EvaluationResult { return t; }
+ );
}
void eachChild(const std::function<void(const Expression&)>& fn) const final {