mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
In order to fix the "self is not defined" issues in Android 8 and React Native. Fixes https://github.com/socketio/engine.io-client/issues/611, https://github.com/socketio/engine.io-client/issues/626 Closes https://github.com/socketio/engine.io-client/pull/627
10 lines
204 B
JavaScript
10 lines
204 B
JavaScript
module.exports = (() => {
|
|
if (typeof self !== "undefined") {
|
|
return self;
|
|
} else if (typeof window !== "undefined") {
|
|
return window;
|
|
} else {
|
|
return Function("return this")();
|
|
}
|
|
})();
|