File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
arduino-ide-extension/src/electron-main/theia Expand file tree Collapse file tree 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 {
291291 true
292292 ) ;
293293 if ( sketchFolderPath ) {
294- this . openFilePromise . reject ( new InterruptWorkspaceRestoreError ( ) ) ;
294+ this . openFilePromise . reject ( {
295+ name : 'InterruptWorkspaceRestoreError' ,
296+ } ) ;
295297 await this . openSketch ( sketchFolderPath ) ;
296298 }
297299 }
@@ -329,10 +331,7 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
329331 // 2. A short timeout resolves the promise automatically, falling back to the usual app launch
330332 await this . openFilePromise . promise ;
331333 } catch ( err ) {
332- if (
333- err &&
334- ( err as InterruptWorkspaceRestoreError ) . isInterruptWorkspaceRestoreError
335- ) {
334+ if ( err && ( err as any ) . name === 'InterruptWorkspaceRestoreError' ) {
336335 // Application has received the `open-file` event and will skip the default application launch
337336 return ;
338337 }
You can’t perform that action at this time.
0 commit comments