mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-24 17:59:58 +02:00
fix: Remove local elements when there is room data during startCollaboration
(#9786)
* Remove local elements when there is room data * Update excalidraw-app/collab/Collab.tsx --------- Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
@@ -530,7 +530,10 @@ class Collab extends PureComponent<CollabProps, CollabState> {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!existingRoomLinkData) {
|
||||
if (existingRoomLinkData) {
|
||||
// when joining existing room, don't merge it with current scene data
|
||||
this.excalidrawAPI.resetScene();
|
||||
} else {
|
||||
const elements = this.excalidrawAPI.getSceneElements().map((element) => {
|
||||
if (isImageElement(element) && element.status === "saved") {
|
||||
return newElementWith(element, { status: "pending" });
|
||||
|
Reference in New Issue
Block a user