itizawa 6 年之前
父節點
當前提交
0687cda0ce
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      src/client/js/services/AppContainer.js

+ 1 - 4
src/client/js/services/AppContainer.js

@@ -47,10 +47,7 @@ export default class AppContainer extends Container {
       this.currentUser = JSON.parse(currentUserElem.textContent);
     }
 
-    let userLocaleId;
-    if (this.currentUser != null) {
-      userLocaleId = this.currentUser.lang;
-    }
+    const userLocaleId = this.currentUser?.lang;
     this.i18n = i18nFactory(userLocaleId);
 
     this.containerInstances = {};