Merge pull request #20161 from prlanzarin/u30/fix/arthurk12-undefined-role-crash

fix: add safeguards when returning user roles
This commit is contained in:
Anton Georgiev 2024-05-03 08:53:01 -04:00 committed by GitHub
commit 05d8f9110b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,7 @@ const getUserRoles = () => {
userId: Auth.userID,
});
return user.role;
return user?.role;
};
const isPresenter = () => {
@ -18,7 +18,7 @@ const isPresenter = () => {
userId: Auth.userID,
});
return user.presenter;
return user?.presenter;
};
const showGuestNotification = () => {