socketio-wildcard
socketio-wildcard copied to clipboard
Ensure args is an array
Id packet.id is null and packet.data is not an array you can expect this error:
CreateListFromArrayLike called on non-object
This commit is fixing this.
Socket.io itself handles event packets in a similar way https://github.com/socketio/socket.io/blob/2b216902e121ac2205444019b6d9316654809b29/lib/socket.js#L351-L359
What's the packet.type when the error is thrown?
Yes, Socket IO is using in a similar way, but socket IO is not using apply.
Apply requires an array. Socket IO is not using apply, that's why it's not crashing socket IO.
Can you provide a minimal code sample that reproduces the error?