Browse Source

Check property is undefined not just falsey

pull/2/head
Luke Childs 9 years ago
parent
commit
dfe6458852
  1. 2
      src/index.js

2
src/index.js

@ -1,6 +1,6 @@
global.window = require('jsdom').jsdom('<html><body></body></html>').defaultView; global.window = require('jsdom').jsdom('<html><body></body></html>').defaultView;
Object.keys(window).forEach(function(prop) { Object.keys(window).forEach(function(prop) {
if(!global[prop]) { if(typeof global[prop] === 'undefined') {
global[prop] = window[prop]; global[prop] = window[prop];
} }
}); });

Loading…
Cancel
Save