Skip to content

Commit

Permalink
socket: forgot this js oddity that you can access objects with string…
Browse files Browse the repository at this point in the history
…s or numbers
  • Loading branch information
rauchg committed Dec 18, 2012
1 parent 8a5cb03 commit 381bc42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Socket.prototype.ack = function(id){
*/

Socket.prototype.onack = function(packet){
var ack = this.acks[Number(packet.id)];
var ack = this.acks[packet.id];
if ('function' == typeof ack) {
debug('calling ack %s with %j', packet.id, packet.data);
ack.apply(this, packet.data);
Expand Down

0 comments on commit 381bc42

Please sign in to comment.