fix: removing all indices from flexsearch index

This commit is contained in:
Chubby Granny Chaser 2024-06-03 16:43:49 +01:00
parent 4b1248b865
commit 467ea29ec2
No known key found for this signature in database
7 changed files with 24 additions and 19 deletions

View file

@ -7,6 +7,10 @@ const repacksIndex = new flexSearch.Index();
const state: { repacks: GameRepack[] } = { repacks: [] };
export const setRepacks = (repacks: GameRepack[]) => {
for (let i = 0; i < state.repacks.length; i++) {
repacksIndex.remove(i);
}
state.repacks = repacks;
for (let i = 0; i < repacks.length; i++) {