Skip to content

Commit 3e541e9

Browse files
committed
fix
1 parent e4981d8 commit 3e541e9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -606,15 +606,17 @@ async function loadApp() {
606606
if (Array.isArray(files) && files.length) {
607607
try {
608608
await restoreFiles(files);
609-
// save state to handle file loading gracefully
610-
sessionStorage.setItem("isfilesRestored", true);
611-
// Process any pending intents that were queued before files were restored
612-
await processPendingIntents();
613609
} catch (error) {
614610
window.log("error", "File loading failed!");
615611
window.log("error", error);
616612
toast("File loading failed!");
613+
} finally {
614+
// Mark restoration complete even after a partial failure so
615+
// switch-file persistence and queued intents are not blocked.
616+
sessionStorage.setItem("isfilesRestored", true);
617617
}
618+
// Process any pending intents that were queued before files were restored
619+
await processPendingIntents();
618620
} else {
619621
// Even when no files need to be restored, mark as restored and process pending intents
620622
sessionStorage.setItem("isfilesRestored", true);

0 commit comments

Comments
 (0)