Skip to content

Commit

Permalink
fix: check for electron >= 14 and link to 2.x migration docs (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
nornagon committed Sep 14, 2021
1 parent 0ae9ba5 commit ee2725f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ const logStack = function (contents: WebContents, code: string, stack: string |
let initialized = false
export function initialize() {
if (initialized)
throw new Error('electron-remote has already been initialized')
throw new Error('@electron/remote has already been initialized')
if (Number(process.versions.electron.split('.')[0]) >= 14)
throw new Error('@electron/remote >= 2.x is required for Electron >= 14. See https://github.com/electron/remote/blob/main/docs/migration-2.md for migration instructions.')
initialized = true
handleRemoteCommand(IPC_MESSAGES.BROWSER_WRONG_CONTEXT_ERROR, function (event, contextId, passedContextId, id) {
const objectId: [string, number] = [passedContextId, id]
Expand Down

0 comments on commit ee2725f

Please sign in to comment.