mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
"This ensures proper saving of collaboration data when user leaves the room Fixes #9104"
This commit is contained in:
parent
9e49c9254b
commit
74b8f7ee26
3 changed files with 16 additions and 11 deletions
|
@ -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 });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue