Explorar o código

ignore fileOpen error when user cancels (#1486)

David Luzar %!s(int64=5) %!d(string=hai) anos
pai
achega
a4b49ea350
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/actions/actionExport.tsx

+ 4 - 0
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 });
           });
       }}