diff --git a/src/sys/es/fan/Env.js b/src/sys/es/fan/Env.js index ec53107a0..f9d2ac6a8 100644 --- a/src/sys/es/fan/Env.js +++ b/src/sys/es/fan/Env.js @@ -24,7 +24,7 @@ class Env extends Obj { this.#vars.caseInsensitive(true); this.#props = Map.make(Str.type$, Str.type$); - const vars = ((typeof globalThis.fan$env) === 'undefined') ? {} : globalThis.fan$env; + const vars = ((typeof js.fan$env) === 'undefined') ? {} : js.fan$env; this.__loadVars(vars); this.#out = new ConsoleOutStream(); @@ -37,7 +37,7 @@ class Env extends Obj { // set some pre-defined vars if (Env.__isNode()) { this.#vars.set("os.name", this.os()); - this.#vars.set("os.version", Env.__node().os.version()); + this.#vars.set("os.version", Env.__node()?.os?.version()); } for (let i=0; i