Skip to content

Commit 372404a

Browse files
committed
Bugfix. Give the plugins the chance the modify the arguments before returning them
1 parent 0d51a33 commit 372404a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/core/pluggable.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ define([
1313
},
1414

1515
initializePlugins: function () {
16+
var i, keys = _.keys(this.plugins);
1617
var args = arguments;
17-
_.each(_.keys(this.plugins), $.proxy(function (k) {
18-
$.proxy(this.plugins[k], this)(this, args);
19-
}, this));
18+
for (i=0; i<keys.length; i++) {
19+
$.proxy(this.plugins[keys[i]], this).apply(this, args);
20+
}
2021
return args;
2122
}
2223
};

0 commit comments

Comments
 (0)