fix: devtools message
This commit is contained in:
parent
e5e339234a
commit
20b3a90777
1 changed files with 6 additions and 4 deletions
|
@ -124,16 +124,18 @@ if (!gotSingleInstanceLock) {
|
|||
|
||||
if (isDev) {
|
||||
await installDevtools();
|
||||
} else {
|
||||
}
|
||||
|
||||
rendererWindow = createWindow(appState);
|
||||
tray = createTray(rendererWindow);
|
||||
|
||||
if (!isDev) {
|
||||
rendererWindow.webContents.on('devtools-opened', () => {
|
||||
// Send a message to the renderer process so we can log a security warning
|
||||
rendererWindow.webContents.send('devtools-is-opened');
|
||||
});
|
||||
}
|
||||
|
||||
rendererWindow = createWindow(appState);
|
||||
tray = createTray(rendererWindow);
|
||||
|
||||
// HACK: patch webrequest to fix devtools incompatibility with electron 2.x.
|
||||
// See https://github.com/electron/electron/issues/13008#issuecomment-400261941
|
||||
session.defaultSession.webRequest.onBeforeRequest({}, (details, callback) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue