Browse Source

macOS: open a new window if none are open when called from CLI - fixes #6031

Eugene Pankov 3 years ago
parent
commit
763bb2c7aa
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/lib/app.ts

+ 3 - 0
app/lib/app.ts

@@ -219,6 +219,9 @@ export class Application {
     }
 
     handleSecondInstance (argv: string[], cwd: string): void {
+        if (!this.windows.length) {
+            await this.newWindow()
+        }
         this.presentAllWindows()
         this.windows[this.windows.length - 1].passCliArguments(argv, cwd, true)
     }