fix: crash at meeting-ended due to undefined access + incorrect meetingID

Fixes an undefined access crash at the meeting-ended component caused by
trying to access a property of a nullish user document.
Fixes incorrect access to the meetingId property of the user document -
currently fetched as meetingID, which doesn't exist.
This commit is contained in:
prlanzarin 2024-04-18 22:44:45 -03:00
parent be96230894
commit 5f59453548

View File

@ -142,7 +142,8 @@ class MeetingEnded extends PureComponent {
this.localUserRole = user.role;
}
const meeting = Meetings.findOne({ id: user?.meetingID });
const meetingID = user?.meetingId || Auth.meetingID;
const meeting = Meetings.findOne({ id: meetingID });
if (meeting) {
this.endWhenNoModeratorMinutes = meeting.durationProps.endWhenNoModeratorDelayInMinutes;