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

This commit is contained in:
Hristo Terezov 2021-03-10 13:36:32 -06:00 committed by Дамян Минков
parent ab6790bdaa
commit 29f5d87d77
2 changed files with 6 additions and 4 deletions

View File

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

View File

@ -135,9 +135,11 @@ function _maybeUpdateDisplayName({ dispatch, getState }) {
if (hasJwt) { if (hasJwt) {
const displayName = getJwtName(state); const displayName = getJwtName(state);
dispatch(updateSettings({ if (displayName) {
displayName dispatch(updateSettings({
})); displayName
}));
}
} }
} }