From b1098a2721210db76feb5ac1caded223cc38f3fc Mon Sep 17 00:00:00 2001 From: Spicy Marinara Date: Wed, 25 Feb 2026 23:58:44 +0100 Subject: [PATCH] Update src/systems/ui/trackerEditor.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/systems/ui/trackerEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systems/ui/trackerEditor.js b/src/systems/ui/trackerEditor.js index 4c27709..f287847 100644 --- a/src/systems/ui/trackerEditor.js +++ b/src/systems/ui/trackerEditor.js @@ -46,7 +46,7 @@ function set_ids_names(list_with_stats, index, value) { const oldId = item?.id; item.name = value; - const ids = list_with_stats.toSpliced(index, 1).map(stat => stat.id); + const ids = list_with_stats.filter((_, i) => i !== index).map(stat => stat.id); const snake_value = safeToSnake(value); // new id format if (snake_value !== value && !ids.includes(snake_value)) { // check if this id already exists item.id = snake_value;