Skip to content

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(guard.js): Delaying the UserAgent request so that the Language is correctly obtained

haitaoocec02e8000e2
diff --git a/ui/src/utils/guard.ts b/ui/src/utils/guard.ts
index a1ec5603..e13d7466 100644
--- a/ui/src/utils/guard.ts
+++ b/ui/src/utils/guard.ts
@@ -390,11 +390,8 @@ export const setupApp = async () => {
* 1. must pre init logged user info for router guard
* 2. must pre init app settings for app render
*/
- await Promise.allSettled([
- pullLoggedUser(),
- pullUcAgent(),
- initAppSettingsStore(),
- ]);
+ await Promise.allSettled([pullLoggedUser(), initAppSettingsStore()]);
+ await Promise.allSettled([pullUcAgent()]);
setupAppLanguage();
setupAppTimeZone();
appInitialized = true;