Ver Fonte

ignore fileOpen error when user cancels (#1486)

David Luzar há 5 anos atrás
pai
commit
a4b49ea350
1 ficheiros alterados com 4 adições e 0 exclusões
  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 });
           });
       }}