Skip to content

Commit

Permalink
Merge pull request #17044 from antobinary/fix-undefined-user
Browse files Browse the repository at this point in the history
fix: Fix undefined user in rare end-breakout scenario
  • Loading branch information
ramonlsouza committed Mar 17, 2023
2 parents 2f3a8f0 + 372e17c commit c3d89ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bigbluebutton-html5/imports/ui/components/audio/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default {
isEchoTest: () => AudioManager.isEchoTest,
error: () => AudioManager.error,
isUserModerator: () => Users.findOne({ userId: Auth.userID },
{ fields: { role: 1 } }).role === ROLE_MODERATOR,
{ fields: { role: 1 } })?.role === ROLE_MODERATOR,
isVoiceUser,
autoplayBlocked: () => AudioManager.autoplayBlocked,
handleAllowAutoplay: () => AudioManager.handleAllowAutoplay(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ class VideoService {
const currentUser = Users.findOne({ userId: Auth.userID },
{ fields: { role: 1 } });

const isModerator = currentUser.role === 'MODERATOR';
const isModerator = currentUser?.role === 'MODERATOR';
const isBreakout = meetingIsBreakout();
const isPinEnabled = this.isPinEnabled();

Expand Down

0 comments on commit c3d89ee

Please sign in to comment.