From 48daa0a77fad148125b69e62563cb4a84568b969 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 27 Feb 2025 19:28:38 +0100 Subject: [PATCH] fix: do not show tooltip with only spaces Co-authored-by: David Larlet --- umap/static/umap/js/modules/data/features.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/umap/static/umap/js/modules/data/features.js b/umap/static/umap/js/modules/data/features.js index cc45dc30..57fcc462 100644 --- a/umap/static/umap/js/modules/data/features.js +++ b/umap/static/umap/js/modules/data/features.js @@ -335,15 +335,15 @@ class Feature { // Variables mode. if (labelKey) { if (Utils.hasVar(labelKey)) { - return Utils.greedyTemplate(labelKey, this.extendedProperties()) + return Utils.greedyTemplate(labelKey, this.extendedProperties()).trim() } keys.unshift(labelKey) } for (const key of keys) { const value = this.properties[key] - if (value) return value + if (value) return value.trim() } - return this.datalayer.getName() + return this.datalayer.getName().trim() } hasPopupFooter() {