From 9b8f9c689b1ced672c7b9fc461c37639f91aa660 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 26 Nov 2024 01:22:09 -0800 Subject: [PATCH] refac --- src/lib/components/admin/Settings/Models.svelte | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/components/admin/Settings/Models.svelte b/src/lib/components/admin/Settings/Models.svelte index 4eb42c5d6..06058fa9f 100644 --- a/src/lib/components/admin/Settings/Models.svelte +++ b/src/lib/components/admin/Settings/Models.svelte @@ -124,12 +124,11 @@ }).catch((error) => { return null; }); - - await init(); } else { await toggleModelById(localStorage.token, model.id); } + await init(); _models.set(await getModels(localStorage.token)); }; @@ -183,7 +182,7 @@
{#if models.length > 0} - {#each filteredModels as model, modelIdx (`${model.id}-${modelIdx}`)} + {#each filteredModels as model, modelIdx (model.id)}
{ toggleModelHandler(model); - await _models.set(await getModels(localStorage.token)); }} />