From 1e48aafb9cdab050bdc3b56eef41b006cf30c1a6 Mon Sep 17 00:00:00 2001 From: David Luzar Date: Tue, 6 Apr 2021 21:27:15 +0200 Subject: [PATCH] fix: incorrectly caching png file handle (#3407) --- src/components/ErrorDialog.tsx | 9 +-------- src/data/blob.ts | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/components/ErrorDialog.tsx b/src/components/ErrorDialog.tsx index fbd8e48c..2886222c 100644 --- a/src/components/ErrorDialog.tsx +++ b/src/components/ErrorDialog.tsx @@ -28,14 +28,7 @@ export const ErrorDialog = ({ onCloseRequest={handleClose} title={t("errorDialog.title")} > -
- {message.split("\n").map((line) => ( - <> - {line} -
- - ))} -
+
{message}
)} diff --git a/src/data/blob.ts b/src/data/blob.ts index 0702436f..0a065038 100644 --- a/src/data/blob.ts +++ b/src/data/blob.ts @@ -95,7 +95,7 @@ export const loadFromBlob = async ( elements: clearElementsForExport(data.elements || []), appState: { theme: localAppState?.theme, - fileHandle: blob.handle ?? null, + fileHandle: (!blob.type.startsWith("image/") && blob.handle) || null, ...cleanAppStateForExport(data.appState || {}), ...(localAppState ? calculateScrollCenter(data.elements || [], localAppState, null)