diff --git a/packages/excalidraw/data/index.ts b/packages/excalidraw/data/index.ts index 7af0d5676c92..2b6592a81536 100644 --- a/packages/excalidraw/data/index.ts +++ b/packages/excalidraw/data/index.ts @@ -169,9 +169,9 @@ export const exportAsImage = async ({ }); if (type === "png") { - const blob = canvasToBlob(tempCanvas); + let blob = canvasToBlob(tempCanvas); if (data.appState.exportEmbedScene) { - blob.then((blob) => + blob = blob.then((blob) => import("./image").then(({ encodePngMetadata }) => encodePngMetadata({ blob,