Skip to content

Commit

Permalink
Merge pull request #51 from strepon/fix-undefined
Browse files Browse the repository at this point in the history
fix(index): filter out not writable "undefined" property
  • Loading branch information
bigopon authored May 6, 2024
2 parents d1ecfff + 69227d3 commit aa68967
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand Down

0 comments on commit aa68967

Please sign in to comment.