Export app before requiring modules
This commit is contained in:
parent
4dbdcad05e
commit
be642612c0
2 changed files with 8 additions and 10 deletions
|
@ -1,12 +1,15 @@
|
|||
'use strict'
|
||||
|
||||
const bindings = process.atomBinding('app')
|
||||
const {app} = bindings
|
||||
|
||||
// Only one app object permitted.
|
||||
module.exports = app
|
||||
|
||||
const electron = require('electron')
|
||||
const {deprecate, Menu} = electron
|
||||
const {EventEmitter} = require('events')
|
||||
|
||||
const bindings = process.atomBinding('app')
|
||||
const {app} = bindings
|
||||
|
||||
Object.setPrototypeOf(app, EventEmitter.prototype)
|
||||
|
||||
let appPath = null
|
||||
|
@ -67,6 +70,3 @@ process.atomBinding('download_item')._setWrapDownloadItem((downloadItem) => {
|
|||
// downloadItem is an EventEmitter.
|
||||
Object.setPrototypeOf(downloadItem, EventEmitter.prototype)
|
||||
})
|
||||
|
||||
// Only one App object pemitted.
|
||||
module.exports = app
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue