mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
load scene from localStorage in collaboration if user is first… (#1036)
* load scene from localStorage in collaboration if user is first in room * load scene from localStorage in collaboration prior to syncing with server * fix merge Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
ba3cec8d0d
commit
f1160a1534
2 changed files with 4 additions and 3 deletions
|
@ -351,13 +351,14 @@ export class App extends React.Component<any, AppState> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const scene = await loadScene(null);
|
||||||
|
this.syncActionResult(scene);
|
||||||
|
|
||||||
const roomMatch = getCollaborationLinkData(window.location.href);
|
const roomMatch = getCollaborationLinkData(window.location.href);
|
||||||
if (roomMatch) {
|
if (roomMatch) {
|
||||||
this.initializeSocketClient();
|
this.initializeSocketClient();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const scene = await loadScene(null);
|
|
||||||
this.syncActionResult(scene);
|
|
||||||
|
|
||||||
window.addEventListener("beforeunload", this.beforeUnload);
|
window.addEventListener("beforeunload", this.beforeUnload);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue