Skip to content

Commit

Permalink
Include mapId in Actors' callback tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand Thakker committed Aug 11, 2016
1 parent 328991d commit 94dfd96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/util/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Actor.prototype.receive = function(message) {
};

Actor.prototype.send = function(type, data, callback, buffers) {
var id = null;
if (callback) this.callbacks[id = this.callbackID++] = callback;
var id = callback ? this.mapId + ':' + this.callbackID++ : null;
if (callback) this.callbacks[id] = callback;
this.postMessage({ mapId: this.mapId, type: type, id: String(id), data: data }, buffers);
};

Expand Down

0 comments on commit 94dfd96

Please sign in to comment.