!3010 修复:删除配置时更新默认配置名称

pull/2972/MERGE
黄诗津 1 month ago committed by ChenX
parent 699804cfe0
commit 4d407cc306

@ -344,7 +344,7 @@ export class UserConfigStore extends Singleton
return configs;
let confNames = [...Object.keys(configs)];
let curName = userConfig.userConfigName[type];
if (!curName)
if (!curName || !confNames.includes(curName))
curName = confNames[0];
return configs[curName];
}
@ -605,6 +605,7 @@ export class UserConfigStore extends Singleton
await this.UpdateBoardOption(newName, type, store);
userConfig.userConfigName[type] = newName;
this.UpdateUserConfig(type, configs[newName]);
await this.UploadUserConfigNames(dbStore);
}
else
{

Loading…
Cancel
Save