fix empty target in radio-group click (#2009)

* fix empty target in radio-group

* Update src/components/radio-group/radio-group.component.ts

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>

* add changelog entry

* prettier

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
This commit is contained in:
Konnor Rogers
2024-05-10 12:31:00 -04:00
committed by GitHub
parent 8726910160
commit 9767e84d26
2 changed files with 2 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti
## Next
- Fixed a bug in `<sl-radio-group>` where if a click did not contain a `<sl-radio>` it would show a console error. [#2009]
- Fixed a bug in `<sl-split-panel>` 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 `<dialog>` where when it showed it would cause a layout shift. [#1967]
- Fixed a bug in `<sl-tooltip>` that allowed unwanted text properties to leak in [#1947]

View File

@@ -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;
}