Do not fail on greedyTemplate when description is an object
Quick fix for not failing with an error in case of #1481
This commit is contained in:
parent
417f1b9d08
commit
6890d47b91
1 changed files with 2 additions and 0 deletions
|
@ -176,6 +176,8 @@ L.Util.greedyTemplate = (str, data, ignore) => {
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof str !== 'string') return ''
|
||||||
|
|
||||||
return str.replace(
|
return str.replace(
|
||||||
/\{ *([^\{\}/\-]+)(?:\|("[^"]*"))? *\}/g,
|
/\{ *([^\{\}/\-]+)(?:\|("[^"]*"))? *\}/g,
|
||||||
(str, key, staticFallback) => {
|
(str, key, staticFallback) => {
|
||||||
|
|
Loading…
Reference in a new issue