Skip to content
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

fix TypeError: binary is not a function #243

Merged
merged 3 commits into from
Nov 6, 2016
Merged

fix TypeError: binary is not a function #243

merged 3 commits into from
Nov 6, 2016

Conversation

tommytroylin
Copy link
Contributor

fix TypeError: binary is not a function
on node versions below 4.5

@sindresorhus
Copy link
Owner

Just do feature testing by checking if Buffer.from exists.

@tommytroylin
Copy link
Contributor Author

@sindresorhus Actually Buffer.from function is exist on node 4.4.4 runtime
So Buffer.from ? Buffer.from(...) : new Buffer(...) won't work.

niksy added a commit to niksy/tv-shows-cli that referenced this pull request Nov 6, 2016
@floatdrop floatdrop merged commit c582d97 into sindresorhus:master Nov 6, 2016
@floatdrop
Copy link
Contributor

floatdrop commented Nov 6, 2016

@tommytroylin replaced process.version with future testing – we prefer to keep process variable out of code, because it will be shimmed in browserified version of got. Thanks for PR 🎉

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.

3 participants