Browse Source

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

j8
Hristo Terezov 4 years ago
parent
commit
29f5d87d77

+ 1
- 1
react/features/base/jwt/functions.js View File

24
 export function getJwtName(state: Object) {
24
 export function getJwtName(state: Object) {
25
     const { user } = state['features/base/jwt'];
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 View File

135
     if (hasJwt) {
135
     if (hasJwt) {
136
         const displayName = getJwtName(state);
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
 

Loading…
Cancel
Save