File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const {
1414 store,
1515} = require ( "./store" ) ;
1616const { fileExists, injectCSS } = require ( "./plugins/utils" ) ;
17+ const { isTesting } = require ( "./utils/testing" ) ;
1718const { setUpTray } = require ( "./tray" ) ;
1819
1920const app = electron . app ;
@@ -49,7 +50,7 @@ function createMainWindow() {
4950 backgroundColor : "#000" ,
5051 show : false ,
5152 webPreferences : {
52- nodeIntegration : false ,
53+ nodeIntegration : isTesting ( ) , // Only necessary when testing with Spectron
5354 preload : path . join ( __dirname , "preload.js" ) ,
5455 nativeWindowOpen : true , // window.open return Window object(like in regular browsers), not BrowserWindowProxy
5556 affinity : "main-window" , // main window, and addition windows should work in one process
You can’t perform that action at this time.
0 commit comments