Skip to content

Commit

Permalink
perf: don't use bind
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Jul 14, 2017
1 parent 6857e9d commit 8271182
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
var data = instance.$data;

var initMethod = function(methodName, method) {
data[methodName] = method.bind(instance);
data[methodName] = function() {
return method.apply(instance, arguments);
}
}

for(var method in methods) {
Expand Down
Loading

0 comments on commit 8271182

Please sign in to comment.