add additional assertion

This commit is contained in:
Andrew Kelley 2013-01-12 05:17:17 -05:00
parent 314c7dd6e4
commit dbb0a4ccbe

View file

@ -1163,6 +1163,7 @@ LongWriter.prototype.write = function(buffer, offset) {
function get(packetId, toServer) {
var packetInfo = packets[packetId];
assert.ok(packetInfo, "unrecognized packet id: " + packetId);
return Array.isArray(packetInfo) ?
packetInfo :
toServer ?