fix "require is undefined" in browsers without node

This commit is contained in:
danbulant 2019-06-23 10:20:20 +02:00
parent b515485fe6
commit 8181ee3c1f

View file

@ -1,4 +1,4 @@
if(typeof require() != undefined){
var wifi, wifiQuality;
// In renderer process (web page).
const { ipcRenderer } = require('electron')
@ -21,3 +21,6 @@ function sendFullscreen(bool){
}
ipcRenderer.send('get-data', 'wifi');
ipcRenderer.send('get-data', 'wifiQuality');
} else {
//no NODE integration, propably browser access
}