diff --git a/src/components/hooks/useMeetingDestination.js b/src/components/hooks/useMeetingDestination.js index c1a66271a..0580576b9 100644 --- a/src/components/hooks/useMeetingDestination.js +++ b/src/components/hooks/useMeetingDestination.js @@ -68,6 +68,7 @@ export default function useMeetingDestination(meetingDestination) { ).subscribe(onMeeting, onError); let beforePageUnload = async () => { + // Call leave only if meeting was joined if (lastMeeting?.ID && lastMeeting.state === MeetingState.JOINED) { await meetingsAdapter.leavemeeting(lastMeeting.ID); }