# HG changeset patch # User Ludovic Chabant # Date 1647656609 25200 # Node ID ba74a7d3709cca0b33e4185bb731060c22bf950c # Parent f7e0926c25000878138cf6d8470192ff80143644 Add try/catch around restoring file state diff -r f7e0926c2500 -r ba74a7d3709c src/main.ts --- a/src/main.ts Fri Mar 18 19:25:48 2022 -0700 +++ b/src/main.ts Fri Mar 18 19:23:29 2022 -0700 @@ -207,7 +207,11 @@ // opened via clicking a hyperlink) // - The file is already currently open in another pane if (!this._suppressNextFileOpen && !this.isFileMultiplyOpen(openedFile)) { - this.restoreFileState(openedFile, activeView); + try { + this.restoreFileState(openedFile, activeView); + } catch (err) { + console.error("Couldn't restore file state: ", err); + } } } // else: the file isn't handled by a markdown editor.