File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments