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) {
const { user } = state['features/base/jwt'];
return user?.name || '';
return user?.name;
}

View File

@ -135,11 +135,13 @@ function _maybeUpdateDisplayName({ dispatch, getState }) {
if (hasJwt) {
const displayName = getJwtName(state);
if (displayName) {
dispatch(updateSettings({
displayName
}));
}
}
}
/**
* Updates the local participant according to settings changes.