Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add global object as another fallback.
In some JavaScript runtimes like NativeScript the `window` or `self` objects are not present, but the `global` is. NativeScript is using Karma as it its unit test runner and thus relies on socket.io for communication. The socket.io client file is served by Karma and loaded in NativeScript. Up until version 1.4.0 this problem was not visible because the root object was not accessed. However this is not the case anymore with latest json3 changes: https://github.com/NativeScript/socket.io-client/blob/master/socket.io.js#L5220
- Loading branch information