diff --git a/dist/index.js b/dist/index.js index d28dfea..da16c93 100644 --- a/dist/index.js +++ b/dist/index.js @@ -66,7 +66,7 @@ function initialize() { exports.initialize = initialize; function createBrowserGlobals() { Object.getOwnPropertyNames(aurelia_pal_1.PLATFORM.global) - .filter(prop => typeof global[prop] === 'undefined') + .filter(prop => typeof global[prop] === 'undefined' && prop !== 'undefined') .forEach(prop => global[prop] = aurelia_pal_1.PLATFORM.global[prop]); } function globalize() { diff --git a/src/index.ts b/src/index.ts index 1c59f99..b82bf78 100644 --- a/src/index.ts +++ b/src/index.ts @@ -75,7 +75,7 @@ export function initialize(): void { function createBrowserGlobals() { Object.getOwnPropertyNames(PLATFORM.global) // avoid conflict with nodejs globals - .filter(prop => typeof global[prop] === 'undefined') + .filter(prop => typeof global[prop] === 'undefined' && prop !== 'undefined') .forEach(prop => global[prop] = PLATFORM.global[prop]); }