Giovanni Gaglione
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
src/index.js
|
|
@ -38,6 +38,10 @@ const browserEnv = function () { |
|
|
|
|
|
|
|
// Copy what's left to the Node.js global scope
|
|
|
|
.forEach(prop => { |
|
|
|
// for fixing https://github.com/lukechilds/browser-env/issues/77
|
|
|
|
if (['Infinity', 'NaN', 'undefined'].includes(prop)) { |
|
|
|
return |
|
|
|
} |
|
|
|
Object.defineProperty(global, prop, { |
|
|
|
configurable: true, |
|
|
|
get: () => window[prop] |
|
|
|