From 4d407cc30618cdd57f552c09f8cabe0263fcf61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=AF=97=E6=B4=A5?= <2723065175@qq.com> Date: Fri, 23 Aug 2024 06:06:35 +0000 Subject: [PATCH] =?UTF-8?q?!3010=20=E4=BF=AE=E5=A4=8D:=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=97=B6=E6=9B=B4=E6=96=B0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UI/Store/UserConfigStore.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UI/Store/UserConfigStore.tsx b/src/UI/Store/UserConfigStore.tsx index fd5554b7a..56f08742c 100644 --- a/src/UI/Store/UserConfigStore.tsx +++ b/src/UI/Store/UserConfigStore.tsx @@ -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 {