From a4b49ea3504b2d3a7a0a8919570c3df86acba1a8 Mon Sep 17 00:00:00 2001 From: David Luzar Date: Sat, 25 Apr 2020 18:02:31 +0200 Subject: [PATCH] ignore fileOpen error when user cancels (#1486) --- src/actions/actionExport.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/actions/actionExport.tsx b/src/actions/actionExport.tsx index ab2fc2ed..e0d6cc2a 100644 --- a/src/actions/actionExport.tsx +++ b/src/actions/actionExport.tsx @@ -112,6 +112,10 @@ export const actionLoadScene = register({ updateData({ elements: elements, appState: appState }); }) .catch((error) => { + // if user cancels, ignore the error + if (error.name === "AbortError") { + return; + } updateData({ error: error.message }); }); }}