diff --git a/src/lib/bind/accessors.html b/src/lib/bind/accessors.html index 405bcfcdd4..2290344114 100644 --- a/src/lib/bind/accessors.html +++ b/src/lib/bind/accessors.html @@ -111,7 +111,8 @@ var propEffect = { kind: kind, effect: effect, - fn: Polymer.Bind['_' + kind + 'Effect'] + fn: Polymer.Bind['_' + kind + 'Effect'], + trigger: property }; fx.push(propEffect); return propEffect; diff --git a/src/standard/effectBuilder.html b/src/standard/effectBuilder.html index 7b81186f79..07b26be646 100644 --- a/src/standard/effectBuilder.html +++ b/src/standard/effectBuilder.html @@ -77,8 +77,10 @@ return this._addPropertyEffect(property, 'function', fn); }, - removeCustomEffect: function(property, fx) { - var effects = this._propertyEffects && this._propertyEffects[property]; + removeCustomEffect: function(fx) { + var property = fx.trigger; + var effects = property && this._propertyEffects && + this._propertyEffects[property]; if (effects) { var index = effects.indexOf(fx); if (index !== -1) { diff --git a/test/unit/bind.html b/test/unit/bind.html index 42a5023441..ff0f46efac 100644 --- a/test/unit/bind.html +++ b/test/unit/bind.html @@ -1048,7 +1048,7 @@ called += 1; }); - el.removeCustomEffect('foo', fx); + el.removeCustomEffect(fx); el.foo = 'bar'; assert.equal(called, 0);