diff --git a/src/micro/attributes.html b/src/micro/attributes.html index d2799f9a51..29df6704ad 100644 --- a/src/micro/attributes.html +++ b/src/micro/attributes.html @@ -193,7 +193,7 @@ 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 378d25729d..cb244a7c34 100644 --- a/src/standard/configure.html +++ b/src/standard/configure.html @@ -116,7 +116,7 @@ _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 @@ 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 f31abdaca2..2b75969bb7 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 @@