Skip to content

Commit 29a67ae

Browse files
committed
Callbacks now get executed in the context of the trackerDictionary
1 parent 577c86f commit 29a67ae

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/js/in_queue.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,9 @@
150150
// Arguments is not an array, so we turn it into one
151151
input = Array.prototype.shift.call(parameterArray);
152152

153-
// Custom callback rather than tracker method, called for each named tracker
153+
// Custom callback rather than tracker method, called with trackerDictionary as the context
154154
if (lodash.isFunction(input)) {
155-
var allNamedTrackers = getNamedTrackers()
156-
for (j = 0; j < allNamedTrackers.length; j++) {
157-
input.apply(allNamedTrackers[j], parameterArray);
158-
}
155+
input.apply(trackerDictionary, parameterArray);
159156
continue;
160157
}
161158

0 commit comments

Comments
 (0)