From 8587cd31dd728f4492689b5be876a8bd17694cd6 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Wed, 22 Dec 2021 21:16:50 +0100 Subject: [PATCH] electron-remote fixes --- app/lib/window.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/lib/window.ts b/app/lib/window.ts index c5de4b4f..e3f3baa3 100644 --- a/app/lib/window.ts +++ b/app/lib/window.ts @@ -3,7 +3,6 @@ import * as glasstron from 'glasstron' import { Subject, Observable, debounceTime } from 'rxjs' import { BrowserWindow, app, ipcMain, Rectangle, Menu, screen, BrowserWindowConstructorOptions, TouchBar, nativeImage } from 'electron' import ElectronConfig = require('electron-config') -import { enable as enableRemote } from '@electron/remote/main' import * as os from 'os' import * as path from 'path' import macOSRelease from 'macos-release' @@ -70,6 +69,7 @@ export class Window { preload: path.join(__dirname, 'sentry.js'), backgroundThrottling: false, contextIsolation: false, + enableRemoteModule: true, }, maximizable: true, frame: false, @@ -129,8 +129,6 @@ export class Window { } }) - enableRemote(this.window.webContents) - this.window.loadURL(`file://${app.getAppPath()}/dist/index.html`, { extraHeaders: 'pragma: no-cache\n' }) this.window.webContents.setVisualZoomLevelLimits(1, 1)