Skip to content

Commit

Permalink
Merge pull request #360 from giacomodeliberali/master
Browse files Browse the repository at this point in the history
Fix Webpack global scope issue
  • Loading branch information
ibc authored Jul 15, 2019
2 parents 6e62787 + d873a91 commit 114661a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/browser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
var _global = (function() { return this; })();
var _global = (function () {
if (!this && typeof global !== 'undefined') {
return global;
}
return this;
})();
var NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
var websocket_version = require('./version');

Expand Down

0 comments on commit 114661a

Please sign in to comment.