Skip to content

Commit

Permalink
Revert "Correct when we register event listeners for acceptByJob"
Browse files Browse the repository at this point in the history
This reverts commit 103d2d3.
  • Loading branch information
iarna committed Aug 4, 2014
1 parent a10f503 commit adfa3ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packet-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ PacketHandler.prototype.unacceptSerial = function (event, callback) {
}

PacketHandler.prototype.acceptByJob = function (event, id, callback) {
if (!this.mapped[event]) {
this.mapped[event] = {};
if (!this.mapped[event]) this.mapped[event] = {};
if (!this.mapped[event][id]) {
this.on(event, this.acceptByJobEventListener);
this.mapped[event][id] = [];
}
if (!this.mapped[event][id]) this.mapped[event][id] = [];
this.mapped[event][id].push(callback);
}

Expand Down

0 comments on commit adfa3ed

Please sign in to comment.