mirror of https://github.com/vladmandic/human
Fix issue #403
parent
f6b64f8efc
commit
cece9bfb22
|
@ -99,7 +99,7 @@ export class Env {
|
||||||
set ImageData(val) { this.#imageData = val; globalThis.ImageData = val; }
|
set ImageData(val) { this.#imageData = val; globalThis.ImageData = val; }
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.browser = typeof navigator !== 'undefined';
|
this.browser = typeof navigator !== 'undefined' && Object.keys(navigator).length !== 0;
|
||||||
this.node = (typeof process !== 'undefined') && (typeof process.versions !== 'undefined') && (typeof process.versions.node !== 'undefined');
|
this.node = (typeof process !== 'undefined') && (typeof process.versions !== 'undefined') && (typeof process.versions.node !== 'undefined');
|
||||||
this.tfjs = { version: tf.version['tfjs-core'] };
|
this.tfjs = { version: tf.version['tfjs-core'] };
|
||||||
this.offscreen = typeof OffscreenCanvas !== 'undefined';
|
this.offscreen = typeof OffscreenCanvas !== 'undefined';
|
||||||
|
|
Loading…
Reference in New Issue