diff --git a/src/micro/attributes.html b/src/micro/attributes.html index d2799f9a..29df6704 100644 --- a/src/micro/attributes.html +++ b/src/micro/attributes.html @@ -193,7 +193,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN break; case Boolean: - value = (value !== null); + value = (value != null); break; case Object: diff --git a/src/standard/configure.html b/src/standard/configure.html index 378d2572..cb244a7c 100644 --- a/src/standard/configure.html +++ b/src/standard/configure.html @@ -116,7 +116,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN _configureProperties: function(properties, config) { for (var i in properties) { var c = properties[i]; - // Allow properties set before upgrade on the instance + // Allow properties set before upgrade on the instance // to override default values. This allows late upgrade + an early set // to not b0rk accessors on the prototype. // Perf testing has shown `hasOwnProperty` to be ok here. @@ -153,7 +153,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var value = (p === x.effect.value) ? config[p] : this._get(x.effect.value, config); if (x.effect.kind == 'attribute') { - value = node.deserialize(value, + value = node.deserialize(node.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 f31abdac..2b75969b 100644 --- a/test/unit/configure-elements.html +++ b/test/unit/configure-elements.html @@ -128,12 +128,18 @@ type: Number, observer: 'attrNumberChanged', value: 0 + }, + attrBoolean: { + type: Boolean, + observer: 'attrBooleanChanged', + // value: true } }, created: function() { this.attrDashChanged = sinon.spy(); this.attrNumberChanged = sinon.spy(); + this.attrBooleanChanged = sinon.spy(); } }); @@ -142,7 +148,7 @@