From 69b8d2e0a15b4826e74aa8785004047d84da7ad8 Mon Sep 17 00:00:00 2001 From: josc146 Date: Thu, 14 Dec 2023 18:37:37 +0800 Subject: [PATCH] fix refreshBuiltInModels --- frontend/src/utils/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/utils/index.tsx b/frontend/src/utils/index.tsx index f65acce..250ea7f 100644 --- a/frontend/src/utils/index.tsx +++ b/frontend/src/utils/index.tsx @@ -51,11 +51,11 @@ export async function refreshBuiltInModels(readCache: boolean = false) { await ReadJson('cache.json').then((cacheData: Cache) => { if (cacheData.models) cache.models = cacheData.models; - else cache.models = manifest.models; + else cache.models = manifest.models.slice(); }).catch(() => { - cache.models = manifest.models; + cache.models = manifest.models.slice(); }); - else cache.models = manifest.models; + else cache.models = manifest.models.slice(); commonStore.setModelSourceList(cache.models); await saveCache().catch(() => {