fix(lion-radio-group): handle unchecked state

This commit is contained in:
Ben Romijn 2019-08-22 11:15:39 +02:00 committed by GitHub
parent 41e12da90d
commit 1adeb46e34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,8 @@ export class LionRadioGroup extends LionFieldset {
} }
get serializedValue() { get serializedValue() {
return this._getCheckedRadioElement().serializedValue; const el = this._getCheckedRadioElement();
return el ? el.serializedValue : '';
} }
set serializedValue(value) { set serializedValue(value) {
@ -43,7 +44,8 @@ export class LionRadioGroup extends LionFieldset {
} }
get formattedValue() { get formattedValue() {
return this._getCheckedRadioElement().formattedValue; const el = this._getCheckedRadioElement();
return el ? el.formattedValue : '';
} }
set formattedValue(value) { set formattedValue(value) {