Skip to content

Commit

Permalink
OEL-3552: Fixed js accessible case.
Browse files Browse the repository at this point in the history
[skip chromatic]
  • Loading branch information
tibi2303 committed Dec 1, 2024
1 parent 04c6da1 commit a392922
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

0 comments on commit a392922

Please sign in to comment.