From 6890d47b91e286c280a3e061f43979ffb04e86ab Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 22 Dec 2023 11:03:38 +0100 Subject: [PATCH] Do not fail on greedyTemplate when description is an object Quick fix for not failing with an error in case of #1481 --- umap/static/umap/js/umap.core.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/umap/static/umap/js/umap.core.js b/umap/static/umap/js/umap.core.js index e3ce8f02..9dd50fa9 100644 --- a/umap/static/umap/js/umap.core.js +++ b/umap/static/umap/js/umap.core.js @@ -176,6 +176,8 @@ L.Util.greedyTemplate = (str, data, ignore) => { return value } + if (typeof str !== 'string') return '' + return str.replace( /\{ *([^\{\}/\-]+)(?:\|("[^"]*"))? *\}/g, (str, key, staticFallback) => {