diff --git a/docs/pages/resources/changelog.md b/docs/pages/resources/changelog.md index c25bceacca..d9e33e50f5 100644 --- a/docs/pages/resources/changelog.md +++ b/docs/pages/resources/changelog.md @@ -14,6 +14,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti ## Next +- Fixed a bug in `` where if a click did not contain a `` it would show a console error. [#2009] - Fixed a bug in `` that caused it not to recalculate it's position when going from being `display: none;` to its original display value. [#1942] - Fixed a bug in `` where when it showed it would cause a layout shift. [#1967] - Fixed a bug in `` that allowed unwanted text properties to leak in [#1947] diff --git a/src/components/radio-group/radio-group.component.ts b/src/components/radio-group/radio-group.component.ts index b066340d37..5873e3344b 100644 --- a/src/components/radio-group/radio-group.component.ts +++ b/src/components/radio-group/radio-group.component.ts @@ -133,7 +133,7 @@ export default class SlRadioGroup extends ShoelaceElement implements ShoelaceFor const radios = this.getAllRadios(); const oldValue = this.value; - if (target.disabled) { + if (!target || target.disabled) { return; }