File tree 1 file changed +4
-5
lines changed
arduino-ide-extension/src/electron-main/theia
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,9 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
291
291
true
292
292
) ;
293
293
if ( sketchFolderPath ) {
294
- this . openFilePromise . reject ( new InterruptWorkspaceRestoreError ( ) ) ;
294
+ this . openFilePromise . reject ( {
295
+ name : 'InterruptWorkspaceRestoreError' ,
296
+ } ) ;
295
297
await this . openSketch ( sketchFolderPath ) ;
296
298
}
297
299
}
@@ -329,10 +331,7 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
329
331
// 2. A short timeout resolves the promise automatically, falling back to the usual app launch
330
332
await this . openFilePromise . promise ;
331
333
} catch ( err ) {
332
- if (
333
- err &&
334
- ( err as InterruptWorkspaceRestoreError ) . isInterruptWorkspaceRestoreError
335
- ) {
334
+ if ( err && ( err as any ) . name === 'InterruptWorkspaceRestoreError' ) {
336
335
// Application has received the `open-file` event and will skip the default application launch
337
336
return ;
338
337
}
You can’t perform that action at this time.
0 commit comments