Selaa lähdekoodia

ignore fileOpen error when user cancels (#1486)

David Luzar 5 vuotta sitten
vanhempi
commit
a4b49ea350
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  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 });
           });
       }}