From 2084392ac7e9b62914e24518eb1265ea404cf0ee Mon Sep 17 00:00:00 2001 From: prlanzarin <4529051+prlanzarin@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:40:28 -0300 Subject: [PATCH] fix: undefined accesses causes crashes in actions-bar breakout utils Multiple undefined accesses in actions-bar's service, mainly related to breakouts and ageneral Meetings info, cause crashes in production environments - most likely in reconnection scenarios. Guarantee that nested data is safely accessed. --- .../imports/ui/components/actions-bar/service.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/actions-bar/service.js b/bigbluebutton-html5/imports/ui/components/actions-bar/service.js index 9b111e99a0..39b91fceea 100755 --- a/bigbluebutton-html5/imports/ui/components/actions-bar/service.js +++ b/bigbluebutton-html5/imports/ui/components/actions-bar/service.js @@ -61,15 +61,15 @@ export default { }, }), meetingName: () => Meetings.findOne({ meetingId: Auth.meetingID }, - { fields: { 'meetingProp.name': 1 } }).meetingProp.name, + { fields: { 'meetingProp.name': 1 } })?.meetingProp?.name, users: () => Users.find({ meetingId: Auth.meetingID, clientType: { $ne: DIAL_IN_USER }, }).fetch(), groups: () => Meetings.findOne({ meetingId: Auth.meetingID }, - { fields: { groups: 1 } }).groups, + { fields: { groups: 1 } })?.groups, isBreakoutRecordable: () => Meetings.findOne({ meetingId: Auth.meetingID }, - { fields: { 'breakoutProps.record': 1 } }).breakoutProps.record, + { fields: { 'breakoutProps.record': 1 } })?.breakoutProps?.record, toggleRecording: () => makeCall('toggleRecording'), createBreakoutRoom: (rooms, durationInMinutes, record = false, captureNotes = false, captureSlides = false, sendInviteToModerators = false) => makeCall('createBreakoutRoom', rooms, durationInMinutes, record, captureNotes, captureSlides, sendInviteToModerators), sendInvitation: (breakoutId, userId) => makeCall('requestJoinURL', { breakoutId, userId }),