Quellcode durchsuchen

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

j8
Hristo Terezov vor 4 Jahren
Ursprung
Commit
29f5d87d77

+ 1
- 1
react/features/base/jwt/functions.js Datei anzeigen

@@ -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 Datei anzeigen

@@ -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
 

Laden…
Abbrechen
Speichern