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

Use Object.assign() for send() options #968

Merged
merged 1 commit into from Jan 14, 2017

Conversation

Nibbler999
Copy link
Member

This avoids mutating the passed in arguments.

The current behaviour breaks sending if you use the same options object for multiple send() calls. I don't know if anyone relies on the arguments being mutated or in being able to pass in undefined explicitly.

This avoids mutating the passed in arguments
@lpinca
Copy link
Member

lpinca commented Jan 14, 2017

LGTM, it should still work when using undefined and I'm +1 for not mutating the options object.
Is there any performance impact? I guess it's irrelevant.

@lpinca lpinca merged commit bd41a05 into websockets:master Jan 14, 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.

None yet

2 participants