From 9acbb7860b1213a01cb67bc0ae9a8ca488b348f5 Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Sun, 3 Nov 2024 14:28:43 +1300 Subject: [PATCH] fix(mods): fix sorting not working without tag selected --- src/lib/mods.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/mods.ts b/src/lib/mods.ts index 48633d1..55b4a27 100644 --- a/src/lib/mods.ts +++ b/src/lib/mods.ts @@ -135,11 +135,7 @@ export function getThemesFromSearch( ): ZenTheme[] { const normalizedQuery = query.toLowerCase(); - // If there's no query and no tags, return all themes (or handle no results case explicitly) - if (!normalizedQuery && tags.length === 0) { - return themes; // Or return an empty array [] if you want no results by default - } - + // Filter themes based on query, tags, and date const filteredThemes = themes.filter((theme) => { const matchesQuery = theme.name.toLowerCase().includes(normalizedQuery); const matchesTag =