-
Notifications
You must be signed in to change notification settings - Fork 55
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 channel names as object prototype keys #777
Conversation
013849d
to
19111ec
Compare
19111ec
to
a7406ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing the presence test as well 👍
6d39b6c
to
9a2e2ab
Compare
9a2e2ab
to
b87c2ce
Compare
I think I have satisfied myself that these tests are unaffected by the changes I've made so please go ahead and merge this for me please @owenpearson - I have fixed a few of the tests, I got to the point of debugging firefox tests and that's a bit too deep in the weeds at this point. I have at least seen passing tests for node 10/12/14 so if you're happy with this let's get it merged. |
When an object key is free-form text, we should not use vanilla js objects, as this can cause key collisions with built-in prototype keys, such as
__proto__
ortoString
, etc. I have offered a quick solution for this issue, but it would be better tackled using an ES6Map
. I am happy for someone to replace these structures with Map instances if they would prefer. I'm not familiar with which versions of js we support and whether we would want aMap
polyfill if things are being back-ported (babel?) for < ES6 compatibility.