mirror of
https://github.com/danbulant/console-hub
synced 2026-07-10 21:41:18 +00:00
fix "require is undefined" in browsers without node
This commit is contained in:
parent
b515485fe6
commit
8181ee3c1f
1 changed files with 24 additions and 21 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue