From 347a02778f5ecfe2943cd56be0d84aca6ded111e Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 9 Apr 2025 17:11:46 +0200 Subject: [PATCH] Fix: regression in themeslist --- src/UI/BigComponents/ThemesList.svelte | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/UI/BigComponents/ThemesList.svelte b/src/UI/BigComponents/ThemesList.svelte index c53da0ac1e..c95f51888d 100644 --- a/src/UI/BigComponents/ThemesList.svelte +++ b/src/UI/BigComponents/ThemesList.svelte @@ -14,16 +14,6 @@ export let state: { osmConnection: OsmConnection } export let onlyIcons: boolean = false export let hasSelection: boolean = true - let themesFiltered: MinimalThemeInformation[] = [] - for (const theme of themes) { - if (!theme) { - continue - } - if (themesFiltered.some(th => th.id === theme.id)) { - continue - } - themesFiltered.push(theme) - }
@@ -33,7 +23,7 @@ ? "flex flex-wrap items-center justify-center gap-x-2" : "theme-list my-2 gap-4 md:grid md:grid-flow-row md:grid-cols-2 lg:grid-cols-3"} > - {#each Utils.NoNull(themesFiltered) as theme (theme.id)} + {#each Utils.DedupOnId(Utils.NoNull(themes)) as theme (theme.id)} {#if $search && hasSelection && themes?.[0] === theme}