Skip to content

Commit

Permalink
Dialog warning causes extra argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mulholland committed Jul 8, 2019
1 parent d9ec2db commit 80ce8b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ app.on('ready', () => {

function createInitialWindow () {
const clIndex = (process.env.NODE_ENV === 'development' || process.env.BABEL_ENV === 'test') ? 1 : 0
if (argv._.length > clIndex) {
// when there is a dialog that first comes up with message dialog (e.g., 'this is an application downloaded from the internet'), another non-string argument is present
if (argv._.length > clIndex && _.isString(argv._[clIndex])) {
return createWindowTabFromFilename(argv._[clIndex])
}
return createWindowTab()
Expand Down

0 comments on commit 80ce8b6

Please sign in to comment.