Explicitely use map default when dynamic var is unset

This commit is contained in:
Yohan Boniface 2023-08-09 09:06:26 +02:00
parent 8758c0dc65
commit 1d0c7008fa

View file

@ -278,10 +278,8 @@ L.U.FeatureMixin = {
let value = this.getOption(option, fallback) let value = this.getOption(option, fallback)
// There is a variable inside. // There is a variable inside.
if (typeof value === 'string' && value.indexOf('{') != -1) { if (typeof value === 'string' && value.indexOf('{') != -1) {
value = L.Util.greedyTemplate(value, this.properties) value = L.Util.greedyTemplate(value, this.properties, true)
// We've not been able to replace the variable, let's reset if (value.indexOf('{') != -1) value = this.map.getDefaultOption(option)
// so we can set a decent default at next step.
if (value.indexOf('{') != -1) value = undefined
} }
return value return value
}, },