File tree 1 file changed +6
-1
lines changed
arduino-ide-extension/src/electron-main/theia
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 {
329
329
// 2. A short timeout resolves the promise automatically, falling back to the usual app launch
330
330
await this . openFilePromise . promise ;
331
331
} catch ( err ) {
332
- if ( err instanceof InterruptWorkspaceRestoreError ) {
332
+ if (
333
+ err &&
334
+ ( err as InterruptWorkspaceRestoreError ) . isInterruptWorkspaceRestoreError
335
+ ) {
333
336
// Application has received the `open-file` event and will skip the default application launch
334
337
return ;
335
338
}
@@ -804,6 +807,8 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
804
807
}
805
808
806
809
class InterruptWorkspaceRestoreError extends Error {
810
+ public readonly isInterruptWorkspaceRestoreError = true ;
811
+
807
812
constructor ( ) {
808
813
super (
809
814
"Received 'open-file' event. Interrupting the default launch workflow."
You can’t perform that action at this time.
0 commit comments