Skip to content

Commit

Permalink
Add real ownerInfo for Cursor methods
Browse files Browse the repository at this point in the history
  • Loading branch information
thani-sh committed Aug 5, 2014
1 parent f45a569 commit d662d33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ function hijackCursor(Cursor) {
&& typeof callback === 'function') {
args[0] = function (doc, index) {
var args = Array.prototype.slice.call(arguments);
var ownerInfo = {type: type, collection: self.collection.name};
var zoneInfo = {type: type, collection: self.collection.name};
zoneInfo.document = doc;
zoneInfo.index = index;
zone.setInfo(type, zoneInfo);
callback = zone.bind(callback, false, {}. pickAllArgs);
callback = zone.bind(callback, false, ownerInfo. pickAllArgs);
return callback.apply(this, args);
};
}
Expand Down

0 comments on commit d662d33

Please sign in to comment.