Use the new style remote module in Electron
This commit is contained in:
parent
b925ac0056
commit
94e24abb99
5 changed files with 7 additions and 14 deletions
|
@ -1,6 +1,5 @@
|
|||
if process.platform is 'linux' and process.type is 'renderer'
|
||||
{remote} = require 'electron'
|
||||
# On Linux we could not access clipboard in renderer process.
|
||||
module.exports = remote.getBuiltin 'clipboard'
|
||||
module.exports = require('electron').remote.clipboard
|
||||
else
|
||||
module.exports = process.atomBinding 'clipboard'
|
||||
|
|
|
@ -16,11 +16,7 @@ class CrashReporter
|
|||
submitURL ?= options.submitUrl
|
||||
deprecate.warn 'submitUrl', 'submitURL'
|
||||
|
||||
{app} =
|
||||
if process.type is 'browser'
|
||||
electron
|
||||
else
|
||||
electron.remote.require 'electron'
|
||||
{app} = if process.type is 'browser' then electron else electron.remote
|
||||
|
||||
@productName ?= app.getName()
|
||||
companyName ?= 'GitHub, Inc'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue