Skip to content

Commit 114661a

Browse files
authored
Merge pull request theturtle32#360 from giacomodeliberali/master
Fix Webpack global scope issue
2 parents 6e62787 + d873a91 commit 114661a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/browser.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
var _global = (function() { return this; })();
1+
var _global = (function () {
2+
if (!this && typeof global !== 'undefined') {
3+
return global;
4+
}
5+
return this;
6+
})();
27
var NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
38
var websocket_version = require('./version');
49

0 commit comments

Comments
 (0)