Skip to content

Commit

Permalink
fix empty target in radio-group click (#2009)
Browse files Browse the repository at this point in the history
* fix empty target in radio-group

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

Co-authored-by: Cory LaViska <[email protected]>

* add changelog entry

* prettier

---------

Co-authored-by: Cory LaViska <[email protected]>
  • Loading branch information
KonnorRogers and claviska committed May 10, 2024
1 parent 8726910 commit 9767e84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/pages/resources/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/components/radio-group/radio-group.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9767e84

Please sign in to comment.