Skip to content

Ensure globals are functions before running instanceof checks #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 1, 2017

Conversation

sgress454
Copy link

File and Blob don't exist in Node, and Buffer and ArrayBuffer don't exist in HTML5. So if an app uses those globals for some other purpose and also uses has-binary, it can crash with a "TypeError: Expecting a function in instanceof check, but got " error. This commit fixes that issue.

refs socketio/socket.io#2871

sgress454 and others added 2 commits February 24, 2017 09:13
…st them.

`File` and `Blob` don't exist in Node, and `Buffer` and `ArrayBuffer` don't exist in HTML5.  So if an app uses those globals for some other purpose and also uses `has-binary`, it can crash with a "TypeError: Expecting a function in instanceof check, but got <whatever>" error.  This commit fixes that issue.
@darrachequesne darrachequesne merged commit f9be9b3 into socketio:master Mar 1, 2017
@darrachequesne
Copy link
Member

Thanks!

darrachequesne added a commit to darrachequesne/socket.io-parser that referenced this pull request Apr 24, 2017
darrachequesne added a commit to socketio/socket.io-parser that referenced this pull request Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants