socketio-wildcard icon indicating copy to clipboard operation
socketio-wildcard copied to clipboard

Ensure args is an array

Open baptistejamin opened this issue 8 years ago • 3 comments

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.

baptistejamin avatar Jun 09 '17 14:06 baptistejamin

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?

hden avatar Jun 10 '17 02:06 hden

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.

baptistejamin avatar Jun 12 '17 11:06 baptistejamin

Can you provide a minimal code sample that reproduces the error?

hden avatar Jun 12 '17 14:06 hden