Browse Source

fixed #77

pull/81/head
Giovanni Gaglione 5 years ago
committed by GitHub
parent
commit
cf4916bbd7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/index.js

4
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]

Loading…
Cancel
Save