Skip to content

Commit

Permalink
Use _clientsReadied to avoid missing attribute->property sets in re…
Browse files Browse the repository at this point in the history
…ady.
  • Loading branch information
Steven Orvell committed Aug 4, 2015
1 parent b269c1d commit 165f716
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/standard/configure.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},

_attributeChangedImpl: function(name) {
var model = this._readied ? this : this._config;
var model = this._clientsReadied ? this : this._config;
this._setAttributeToProperty(model, name);
},

Expand Down
12 changes: 11 additions & 1 deletion test/unit/attributes-elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,19 @@
</dom-module>
<script>
Polymer({

is: 'x-compose',

hostAttributes: {
attr1: 'compose'
},
is: 'x-compose'

properties: {
prop2: String
},

ready: function() {
this.setAttribute('prop2', 'hi');
}
});
</script>
1 change: 1 addition & 0 deletions test/unit/attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
assert.strictEqual(compose.$.basic.prop, 'compose');
assert.equal(compose.$.basic.propChangedCount, 1);
assert.equal(compose.$.basic.attr1ChangedCount, 1);
assert.equal(compose.prop2, 'hi');
});

});
Expand Down

0 comments on commit 165f716

Please sign in to comment.