Explicitely use map default when dynamic var is unset
This commit is contained in:
parent
8758c0dc65
commit
1d0c7008fa
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue