Skip to content

Commit

Permalink
clone elements before export
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelle committed Nov 12, 2023
1 parent a0e3b84 commit 8f3ade2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scene/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
getElementAbsoluteCoords,
} from "../element/bounds";
import { renderStaticScene, renderSceneToSvg } from "../renderer/renderScene";
import { distance, getFontString } from "../utils";
import { cloneJSON, distance, getFontString } from "../utils";
import { AppState, BinaryFiles } from "../types";
import {
DEFAULT_BACKGROUND_COLOR,
Expand Down Expand Up @@ -58,7 +58,7 @@ const __createSceneForElementsHack__ = (
// orig ids when embedding. So we do another hack of not mapping element
// ids to Scene instances so that we don't override the editor elements
// mapping
scene.replaceAllElements(elements, false);
scene.replaceAllElements(cloneJSON(elements), false);
return scene;
};

Expand Down

0 comments on commit 8f3ade2

Please sign in to comment.