Skip to content

Commit

Permalink
OEL-3552: Fixed js accessible case. (#633)
Browse files Browse the repository at this point in the history
[skip chromatic]
  • Loading branch information
tibi2303 authored Dec 10, 2024
1 parent 95207c8 commit 5150493
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ class AccessibleToggle {
this.type = type;

const target = triggerElement.getAttribute("data-bs-target") || triggerElement.getAttribute("href");
if (!target || target === "#") {
return;
}

this.targetElement = SelectorEngine.findOne(target);
if (!this.targetElement) {
return;
}

if (this.type === "modal") {
this.instance = Modal.getOrCreateInstance(this.targetElement);
Expand Down

1 comment on commit 5150493

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.