Skip to content

Commit

Permalink
Avoid function lookup by string.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Oct 19, 2015
1 parent ce2c2ce commit e2674bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/bind/accessors.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,12 @@
},

_effectEffects: function(property, value, effects, old, fromAbove) {
effects.forEach(function(fx) {
//console.log(fx);
var fn = Polymer.Bind['_' + fx.kind + 'Effect'];
for (var i=0, l=effects.length, fx; (i<l) && (fx=effects[i]); i++) {
var fn = fx.fn;
if (fn) {
fn.call(this, property, value, fx.effect, old, fromAbove);
}
}, this);
}
},

_clearPath: function(path) {
Expand All @@ -112,7 +111,8 @@
var fx = this.ensurePropertyEffects(model, property);
fx.push({
kind: kind,
effect: effect
effect: effect,
fn: Polymer.Bind['_' + kind + 'Effect']
});
},

Expand Down

0 comments on commit e2674bc

Please sign in to comment.