fix(prejoin): Don't overwrite display name with ''
This commit is contained in:
parent
ab6790bdaa
commit
29f5d87d77
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue