Fix NodeJS check for electron renderer

Signed-off-by: Matthew Peveler <mpeveler@timescale.com>
pull/49/head
Matthew Peveler 7 months ago committed by GitHub
parent 138e2e169b
commit b9db45c067
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -17,7 +17,7 @@
WINDOW = false;
}
var WEB_WORKER = !WINDOW && typeof self === 'object';
var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node && process.type != 'renderer';
if (NODE_JS) {
root = global;
} else if (WEB_WORKER) {

Loading…
Cancel
Save