fix refreshBuiltInModels
This commit is contained in:
parent
0ddd2e9fea
commit
69b8d2e0a1
@ -51,11 +51,11 @@ export async function refreshBuiltInModels(readCache: boolean = false) {
|
|||||||
await ReadJson('cache.json').then((cacheData: Cache) => {
|
await ReadJson('cache.json').then((cacheData: Cache) => {
|
||||||
if (cacheData.models)
|
if (cacheData.models)
|
||||||
cache.models = cacheData.models;
|
cache.models = cacheData.models;
|
||||||
else cache.models = manifest.models;
|
else cache.models = manifest.models.slice();
|
||||||
}).catch(() => {
|
}).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);
|
commonStore.setModelSourceList(cache.models);
|
||||||
await saveCache().catch(() => {
|
await saveCache().catch(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user