Merge pull request #20013 from prlanzarin/u27/fix/arthurk12-undefined-role-crash
[2.7] fix: add safeguards when returning user roles
This commit is contained in:
commit
85b5e83bd5
@ -11,7 +11,7 @@ const getUserRoles = () => {
|
||||
userId: Auth.userID,
|
||||
});
|
||||
|
||||
return user.role;
|
||||
return user?.role;
|
||||
};
|
||||
|
||||
const isPresenter = () => {
|
||||
@ -19,7 +19,7 @@ const isPresenter = () => {
|
||||
userId: Auth.userID,
|
||||
});
|
||||
|
||||
return user.presenter;
|
||||
return user?.presenter;
|
||||
};
|
||||
|
||||
const showGuestNotification = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user