@@ -4297,13 +4297,17 @@ return /******/ (function(modules) { // webpackBootstrap
42974297 var inherit = __webpack_require__ ( 19 ) ;
42984298 var yeast = __webpack_require__ ( 20 ) ;
42994299 var debug = __webpack_require__ ( 21 ) ( 'engine.io-client:websocket' ) ;
4300+
43004301 var BrowserWebSocket , NodeWebSocket ;
4301- if ( typeof self === 'undefined' ) {
4302+
4303+ if ( typeof WebSocket !== 'undefined' ) {
4304+ BrowserWebSocket = WebSocket ;
4305+ } else if ( typeof self !== 'undefined' ) {
4306+ BrowserWebSocket = self . WebSocket || self . MozWebSocket ;
4307+ } else {
43024308 try {
43034309 NodeWebSocket = __webpack_require__ ( 27 ) ;
43044310 } catch ( e ) { }
4305- } else {
4306- BrowserWebSocket = self . WebSocket || self . MozWebSocket ;
43074311 }
43084312
43094313 /**
@@ -4312,7 +4316,7 @@ return /******/ (function(modules) { // webpackBootstrap
43124316 * interface exposed by `ws` for Node-like environment.
43134317 */
43144318
4315- var WebSocket = BrowserWebSocket || NodeWebSocket ;
4319+ var WebSocketImpl = BrowserWebSocket || NodeWebSocket ;
43164320
43174321 /**
43184322 * Module exports.
@@ -4336,7 +4340,7 @@ return /******/ (function(modules) { // webpackBootstrap
43364340 this . usingBrowserWebSocket = BrowserWebSocket && ! opts . forceNode ;
43374341 this . protocols = opts . protocols ;
43384342 if ( ! this . usingBrowserWebSocket ) {
4339- WebSocket = NodeWebSocket ;
4343+ WebSocketImpl = NodeWebSocket ;
43404344 }
43414345 Transport . call ( this , opts ) ;
43424346 }
@@ -4396,7 +4400,7 @@ return /******/ (function(modules) { // webpackBootstrap
43964400 }
43974401
43984402 try {
4399- this . ws = this . usingBrowserWebSocket && ! this . isReactNative ? protocols ? new WebSocket ( uri , protocols ) : new WebSocket ( uri ) : new WebSocket ( uri , protocols , opts ) ;
4403+ this . ws = this . usingBrowserWebSocket && ! this . isReactNative ? protocols ? new WebSocketImpl ( uri , protocols ) : new WebSocketImpl ( uri ) : new WebSocketImpl ( uri , protocols , opts ) ;
44004404 } catch ( err ) {
44014405 return this . emit ( 'error' , err ) ;
44024406 }
@@ -4568,7 +4572,7 @@ return /******/ (function(modules) { // webpackBootstrap
45684572 */
45694573
45704574 WS . prototype . check = function ( ) {
4571- return ! ! WebSocket && ! ( '__initialize' in WebSocket && this . name === WS . prototype . name ) ;
4575+ return ! ! WebSocketImpl && ! ( '__initialize' in WebSocketImpl && this . name === WS . prototype . name ) ;
45724576 } ;
45734577
45744578/***/ } ,
0 commit comments