diff --git a/paper-radio-group.html b/paper-radio-group.html index 93ac1ac..7e4989d 100644 --- a/paper-radio-group.html +++ b/paper-radio-group.html @@ -132,24 +132,27 @@ return; } - if (this.selected) { + if ( (this.selected !== undefined) && (this.selected !== null)) { var oldItem = this._valueToItem(this.selected); - if (this.selected == value) { + if (this.selected === value) { // If deselecting is allowed we'll have to apply an empty selection. // Otherwise, we should force the selection to stay and make this // action a no-op. if (this.allowEmptySelection) { value = ''; } else { - if (oldItem) + if (oldItem) { oldItem.checked = true; + } + return; } } - if (oldItem) + if (oldItem) { oldItem.checked = false; + } } Polymer.IronSelectableBehavior.select.apply(this, [value]); diff --git a/test/basic.html b/test/basic.html index ab798cd..b8df876 100644 --- a/test/basic.html +++ b/test/basic.html @@ -42,6 +42,15 @@ + + + +