diff --git a/src/lib/bind/accessors.html b/src/lib/bind/accessors.html index 68f2b3355c..19af32507e 100644 --- a/src/lib/bind/accessors.html +++ b/src/lib/bind/accessors.html @@ -70,7 +70,7 @@ var effects = node._propertyEffects && node._propertyEffects[property]; if (effects) { node._propertySetter(property, value, effects, quiet); - } else { + } else if (node[property] !== value) { node[property] = value; } }, diff --git a/test/unit/bind.html b/test/unit/bind.html index 9837496dc8..cfd92ee91e 100644 --- a/test/unit/bind.html +++ b/test/unit/bind.html @@ -869,6 +869,20 @@ assert.isTrue(el._isAttachedChanged.calledOnce); document.body.removeChild(el); }); + + test('do not override property when going downwards', function() { + var value = 5, value_set_again = false, targetObj = { + get value () { + return value; + }, + set value (v) { + value = v; + value_set_again = true; + } + }; + Polymer.Bind._modelApi.__setProperty('value', 5, false, targetObj); + assert.isFalse(value_set_again); + }); }); suite('compound binding / string interpolation', function() {