selective import
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const appConfig = require('application-config')('WebTorrent')
|
||||
const path = require('path')
|
||||
const electron = require('electron')
|
||||
const { app, remote } = require('electron')
|
||||
const arch = require('arch')
|
||||
|
||||
const APP_NAME = 'WebTorrent'
|
||||
@@ -126,10 +126,10 @@ function getPath (key) {
|
||||
return ''
|
||||
} else if (process.type === 'renderer') {
|
||||
// Electron renderer process
|
||||
return electron.remote.app.getPath(key)
|
||||
return remote.app.getPath(key)
|
||||
} else {
|
||||
// Electron main process
|
||||
return electron.app.getPath(key)
|
||||
return app.getPath(key)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user