From f93c3e5c489f7fe3cfbc4436c64149a49b0bb590 Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Fri, 19 Feb 2016 14:34:50 -0800 Subject: [PATCH] Make sure to configure properties on polymer elements that do not have property effects. --- src/standard/configure.html | 9 ++++++--- test/unit/configure-elements.html | 22 ++++++++++++++++++++++ test/unit/configure.html | 5 +++++ 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/standard/configure.html b/src/standard/configure.html index 023104e9a9..c492bdeac7 100644 --- a/src/standard/configure.html +++ b/src/standard/configure.html @@ -149,14 +149,17 @@ var node = this._nodes[x.effect.index]; var name = x.effect.propertyName; // seeding configuration only - if (node._propertyEffects && node._propertyEffects[name]) { + var isAttr = (x.effect.kind == 'attribute'); + var hasEffect = (node._propertyEffects && + node._propertyEffects[name]); + if (node._configValue && (hasEffect || !isAttr)) { var value = (p === x.effect.value) ? config[p] : this._get(x.effect.value, config); - if (x.effect.kind == 'attribute') { + if (isAttr) { // For attribute bindings, flow through the same ser/deser // process to ensure the value is the same as if it were // bound through the attribute - value = node.deserialize(node.serialize(value), + value = node.deserialize(this.serialize(value), node._propertyInfo[name].type); } node._configValue(name, value); diff --git a/test/unit/configure-elements.html b/test/unit/configure-elements.html index 06b3475799..a56bdafa4f 100644 --- a/test/unit/configure-elements.html +++ b/test/unit/configure-elements.html @@ -146,9 +146,28 @@ + + + +