File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
arduino-ide-extension/src/electron-main/theia Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -329,7 +329,10 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
329329 // 2. A short timeout resolves the promise automatically, falling back to the usual app launch
330330 await this . openFilePromise . promise ;
331331 } catch ( err ) {
332- if ( err instanceof InterruptWorkspaceRestoreError ) {
332+ if (
333+ err &&
334+ ( err as InterruptWorkspaceRestoreError ) . isInterruptWorkspaceRestoreError
335+ ) {
333336 // Application has received the `open-file` event and will skip the default application launch
334337 return ;
335338 }
@@ -804,6 +807,8 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
804807}
805808
806809class InterruptWorkspaceRestoreError extends Error {
810+ public readonly isInterruptWorkspaceRestoreError = true ;
811+
807812 constructor ( ) {
808813 super (
809814 "Received 'open-file' event. Interrupting the default launch workflow."
You can’t perform that action at this time.
0 commit comments