A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix(loggedUserInfoStore): Avoiding errors in `update` operations
haitaoo2672f435258d
diff --git a/ui/src/stores/loggedUserInfoStore.ts b/ui/src/stores/loggedUserInfoStore.tsindex 5ccbcb96..aa3cc34f 100644--- a/ui/src/stores/loggedUserInfoStore.ts+++ b/ui/src/stores/loggedUserInfoStore.ts@@ -34,6 +34,9 @@ const initUser: UserInfoRes = {const loggedUserInfoStore = create<UserInfoStore>((set) => ({user: initUser,update: (params) => {+ if (typeof params !== 'object' || !params) {+ return;+ }if (!params?.language) {params.language = 'Default';}