From 1d0c7008fa3d781e227b2530912d6ebb86146ef9 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 9 Aug 2023 09:06:26 +0200 Subject: [PATCH] Explicitely use map default when dynamic var is unset --- umap/static/umap/js/umap.features.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index 2aaecacd..c86086e6 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -278,10 +278,8 @@ L.U.FeatureMixin = { let value = this.getOption(option, fallback) // There is a variable inside. if (typeof value === 'string' && value.indexOf('{') != -1) { - value = L.Util.greedyTemplate(value, this.properties) - // We've not been able to replace the variable, let's reset - // so we can set a decent default at next step. - if (value.indexOf('{') != -1) value = undefined + value = L.Util.greedyTemplate(value, this.properties, true) + if (value.indexOf('{') != -1) value = this.map.getDefaultOption(option) } return value },