From 72032f23970ffa7af66a4ea3ad5e865a9c3452e0 Mon Sep 17 00:00:00 2001 From: Arthurk12 Date: Wed, 10 Apr 2024 11:35:48 -0300 Subject: [PATCH] fix: add safeguards when returning user roles --- bigbluebutton-html5/imports/ui/components/settings/service.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/settings/service.js b/bigbluebutton-html5/imports/ui/components/settings/service.js index 1450cef774..2317e467c9 100644 --- a/bigbluebutton-html5/imports/ui/components/settings/service.js +++ b/bigbluebutton-html5/imports/ui/components/settings/service.js @@ -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 = () => {