fix refreshBuiltInModels

This commit is contained in:
josc146 2023-12-14 18:37:37 +08:00
parent 0ddd2e9fea
commit 69b8d2e0a1

View File

@ -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(() => {