@openeuropa/bcl-theme-joinup 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4708,7 +4708,13 @@
4708
4708
  this.triggerElement = triggerElement;
4709
4709
  this.type = type;
4710
4710
  const target = triggerElement.getAttribute("data-bs-target") || triggerElement.getAttribute("href");
4711
+ if (!target || target === "#") {
4712
+ return;
4713
+ }
4711
4714
  this.targetElement = SelectorEngine.findOne(target);
4715
+ if (!this.targetElement) {
4716
+ return;
4717
+ }
4712
4718
  if (this.type === "modal") {
4713
4719
  this.instance = Modal.getOrCreateInstance(this.targetElement);
4714
4720
  } else if (this.type === "offcanvas") {