From a8468cb4fa3f52662b66247afeb23f51073acc21 Mon Sep 17 00:00:00 2001 From: David Larlet <3556+davidbgk@users.noreply.github.com> Date: Mon, 22 Jul 2024 09:58:17 -0400 Subject: [PATCH] chore: modern JS --- umap/static/umap/js/modules/utils.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/umap/static/umap/js/modules/utils.js b/umap/static/umap/js/modules/utils.js index 4a6cf680..b117cf1a 100644 --- a/umap/static/umap/js/modules/utils.js +++ b/umap/static/umap/js/modules/utils.js @@ -240,8 +240,7 @@ export function greedyTemplate(str, data, ignore) { if (staticFallback !== undefined) { vars.push(staticFallback) } - for (let i = 0; i < vars.length; i++) { - path = vars[i] + for (const path of vars) { if (path.startsWith('"') && path.endsWith('"')) { value = path.substring(1, path.length - 1) // static default value. } else {