refactor: use helpers when using the remote module in sandboxed renderers (#15960)

This commit is contained in:
Milan Burda 2018-12-05 19:07:32 +01:00 committed by Shelley Vohr
parent d243a45173
commit ab2a061b59
11 changed files with 46 additions and 28 deletions

View file

@ -2,8 +2,8 @@
if (process.platform === 'linux' && process.type === 'renderer') {
// On Linux we could not access clipboard in renderer process.
const { getRemoteForUsage } = require('@electron/internal/renderer/remote')
module.exports = getRemoteForUsage('clipboard').clipboard
const { getRemote } = require('@electron/internal/renderer/remote')
module.exports = getRemote('clipboard')
} else {
const clipboard = process.atomBinding('clipboard')