浏览代码

fix(prejoin): Don't overwrite display name with ''

j8
Hristo Terezov 4 年前
父节点
当前提交
29f5d87d77
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 1
    1
      react/features/base/jwt/functions.js
  2. 5
    3
      react/features/base/settings/middleware.js

+ 1
- 1
react/features/base/jwt/functions.js 查看文件

@@ -24,5 +24,5 @@ export function parseJWTFromURLParams(url: URL = window.location) {
24 24
 export function getJwtName(state: Object) {
25 25
     const { user } = state['features/base/jwt'];
26 26
 
27
-    return user?.name || '';
27
+    return user?.name;
28 28
 }

+ 5
- 3
react/features/base/settings/middleware.js 查看文件

@@ -135,9 +135,11 @@ function _maybeUpdateDisplayName({ dispatch, getState }) {
135 135
     if (hasJwt) {
136 136
         const displayName = getJwtName(state);
137 137
 
138
-        dispatch(updateSettings({
139
-            displayName
140
-        }));
138
+        if (displayName) {
139
+            dispatch(updateSettings({
140
+                displayName
141
+            }));
142
+        }
141 143
     }
142 144
 }
143 145
 

正在加载...
取消
保存