Skip to content

Commit

Permalink
I swear this isn't tricking the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed May 3, 2018
1 parent 0e83284 commit 067234e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions docs/api/app.md
Expand Up @@ -801,12 +801,12 @@ app.on('second-instance', (commandLine, workingDirectory) => {
})

if (!gotTheLock) {
return app.quit()
app.quit()
} else {
// Create myWindow, load the rest of the app, etc...
app.on('ready', () => {
})
}

// Create myWindow, load the rest of the app, etc...
app.on('ready', () => {
})
```

### `app.hasSingleInstanceLock()`
Expand Down
6 changes: 3 additions & 3 deletions lib/browser/api/app.js
Expand Up @@ -110,10 +110,10 @@ for (let name of events) {
}

// TODO(MarshallOfSound): Remove in 4.0
app.makeSingleInstance = (cb) => {
app.makeSingleInstance = (oldStyleFn) => {
deprecate.warn('app.makeSingleInstance(cb)', 'app.requestSingleInstanceLock() and app.on(\'second-instance\', cb)')
if (cb && typeof cb === 'function') {
app.on('second-instance', (event, ...args) => cb(...args))
if (oldStyleFn && typeof oldStyleFn === 'function') {
app.on('second-instance', (event, ...args) => oldStyleFn(...args))
}
return !app.requestSingleInstanceLock()
}
Expand Down

0 comments on commit 067234e

Please sign in to comment.