fix: add safeguards when returning user roles

This commit is contained in:
Arthurk12 2024-04-10 11:35:48 -03:00 committed by prlanzarin
parent fcbfcb1bbc
commit 72032f2397

View File

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