mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
ignore fileOpen error when user cancels (#1486)
This commit is contained in:
parent
1866074c07
commit
a4b49ea350
1 changed files with 4 additions and 0 deletions
|
@ -112,6 +112,10 @@ export const actionLoadScene = register({
|
||||||
updateData({ elements: elements, appState: appState });
|
updateData({ elements: elements, appState: appState });
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
// if user cancels, ignore the error
|
||||||
|
if (error.name === "AbortError") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
updateData({ error: error.message });
|
updateData({ error: error.message });
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue