"This ensures proper saving of collaboration data when user leaves the room Fixes #9104"

This commit is contained in:
Shivansh Kumar 2025-02-10 01:14:48 +05:30
parent 9e49c9254b
commit 74b8f7ee26
3 changed files with 16 additions and 11 deletions

View file

@ -476,7 +476,7 @@ const ExcalidrawWrapper = () => {
collabAPI?.isCollaborating() &&
!isCollaborationLink(window.location.href)
) {
collabAPI.stopCollaboration(false);
await collabAPI.stopCollaboration(false);
}
excalidrawAPI.updateScene({ appState: { isLoading: true } });
@ -968,9 +968,9 @@ const ExcalidrawWrapper = () => {
"exit",
"collaboration",
],
perform: () => {
perform: async () => {
if (collabAPI) {
collabAPI.stopCollaboration();
await collabAPI.stopCollaboration();
if (!collabAPI.isCollaborating()) {
setShareDialogState({ isOpen: false });
}