From d42e47afec8b4ade8ba71ed7912256ed4c043e9b Mon Sep 17 00:00:00 2001 From: dwelle <5153846+dwelle@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:42:58 +0200 Subject: [PATCH] fi --- excalidraw-app/components/AI.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/excalidraw-app/components/AI.tsx b/excalidraw-app/components/AI.tsx index 621d6befa7a02..3fb8610c536ce 100644 --- a/excalidraw-app/components/AI.tsx +++ b/excalidraw-app/components/AI.tsx @@ -21,15 +21,19 @@ export const AIComponents = ({ const appState = excalidrawAPI.getAppState(); const blob = await exportToBlob({ - elements: children, - appState: { - ...appState, - exportBackground: true, - viewBackgroundColor: appState.viewBackgroundColor, + data: { + elements: children, + appState: { + ...appState, + exportBackground: true, + viewBackgroundColor: appState.viewBackgroundColor, + }, + files: excalidrawAPI.getFiles(), + }, + config: { + exportingFrame: frame, + mimeType: MIME_TYPES.jpg, }, - exportingFrame: frame, - files: excalidrawAPI.getFiles(), - mimeType: MIME_TYPES.jpg, }); const dataURL = await getDataURL(blob);