Skip to content

Commit ae13958

Browse files
committed
use .call() with fixed argument in utils.bind(), which is faster than .apply()
1 parent 0d728a2 commit ae13958

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ var utils = module.exports = {
6060
* enough for the usecase and fast than native bind()
6161
*/
6262
bind: function (fn, ctx) {
63-
return function () {
64-
return fn.apply(ctx, arguments)
63+
return function (arg) {
64+
return fn.call(ctx, arg)
6565
}
6666
},
6767

0 commit comments

Comments
 (0)