File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1- var _global = ( function ( ) {
2- if ( ! this && typeof global !== 'undefined' ) {
3- return global ;
4- }
5- return this ;
6- } ) ( ) ;
7- var NativeWebSocket = _global . WebSocket || _global . MozWebSocket ;
1+ var _globalThis ;
2+ try {
3+ _globalThis = require ( 'es5-ext/global' ) ;
4+ } catch ( error ) {
5+ } finally {
6+ if ( ! _globalThis && typeof window !== 'undefined' ) { _globalThis = window ; }
7+ if ( ! _globalThis ) { throw new Error ( 'Could not determine global this' ) ; }
8+ }
9+
10+ var NativeWebSocket = _globalThis . WebSocket || _globalThis . MozWebSocket ;
811var websocket_version = require ( './version' ) ;
912
1013
Original file line number Diff line number Diff line change 2828 },
2929 "dependencies" : {
3030 "debug" : " ^2.2.0" ,
31+ "es5-ext" : " ^0.10.50" ,
3132 "nan" : " ^2.14.0" ,
3233 "typedarray-to-buffer" : " ^3.1.5" ,
3334 "yaeti" : " ^0.0.6"
You can’t perform that action at this time.
0 commit comments