You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that if you have the prototype.js library installed on your page then the socket.io-client isn't going to work right. I've narrowed down a few of the issues to the fact that the prototype.js library override Array's toJSON function. And if your browser has nativeJSON then the browser is going to call that toJSON function which is going to mess up functions like stringify which socket.io-client uses heavily.
The final problem being that if I emit something to the server it ends up being malformed and, in my case, ends up sending an ARRAY instead of an OBJECT.
I'm not sure the best approach here. Perhaps relying on nativeJSON should be removed?
The text was updated successfully, but these errors were encountered:
I've noticed that if you have the prototype.js library installed on your page then the socket.io-client isn't going to work right. I've narrowed down a few of the issues to the fact that the prototype.js library override Array's toJSON function. And if your browser has nativeJSON then the browser is going to call that toJSON function which is going to mess up functions like stringify which socket.io-client uses heavily.
The final problem being that if I emit something to the server it ends up being malformed and, in my case, ends up sending an ARRAY instead of an OBJECT.
I'm not sure the best approach here. Perhaps relying on nativeJSON should be removed?
The text was updated successfully, but these errors were encountered: