From 5b5102f909b7f869ec7cb2189d6a5ce15a2749e4 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 8 Apr 2025 15:21:27 +0200 Subject: [PATCH] fix: fix categorized layer crashing with null value Do not call toString on a null value --- umap/static/umap/js/modules/utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/umap/static/umap/js/modules/utils.js b/umap/static/umap/js/modules/utils.js index 625674da..d80df511 100644 --- a/umap/static/umap/js/modules/utils.js +++ b/umap/static/umap/js/modules/utils.js @@ -283,6 +283,8 @@ export function greedyTemplate(str, data, ignore) { } export function naturalSort(a, b, lang) { + a ??= '' + b ??= '' return a .toString() .toLowerCase()