From fd09da952dd3f9d9b8fe145ed0d6d804d0db59d2 Mon Sep 17 00:00:00 2001 From: I Made Setia Baruna Date: Fri, 8 Jan 2021 16:32:22 +0800 Subject: [PATCH] Fix weapon and character search --- src/components/CharacterSelect.svelte | 2 +- src/components/WeaponSelect.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/CharacterSelect.svelte b/src/components/CharacterSelect.svelte index 60e69eb6..3ba2328d 100644 --- a/src/components/CharacterSelect.svelte +++ b/src/components/CharacterSelect.svelte @@ -91,7 +91,7 @@ $: characters = Object.entries(characterList).sort((a, b) => a[1].name.localeCompare(b[1].name)); - $: filteredCharacter = characters.filter((e) => e[1].name.toLowerCase().includes(search)); + $: filteredCharacter = characters.filter((e) => e[1].name.toLowerCase().includes(search.toLowerCase())); $: maxItemRow = Math.min(6, filteredCharacter.length); $: nothingSelected = selected === null; diff --git a/src/components/WeaponSelect.svelte b/src/components/WeaponSelect.svelte index db4792c0..94b51627 100644 --- a/src/components/WeaponSelect.svelte +++ b/src/components/WeaponSelect.svelte @@ -93,7 +93,7 @@ .filter((e) => e[1].rarity >= 3) .sort((a, b) => a[1].name.localeCompare(b[1].name)); - $: filteredWeapons = weapons.filter((e) => e[1].name.toLowerCase().includes(search)); + $: filteredWeapons = weapons.filter((e) => e[1].name.toLowerCase().includes(search.toLowerCase())); $: maxItemRow = Math.min(6, filteredWeapons.length); $: nothingSelected = selected === null;