ngx-xtroedge-cms 1.3.13 → 1.3.14

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.
package/dist/index.mjs CHANGED
@@ -1361,8 +1361,11 @@ var XtroedgeCMS = class _XtroedgeCMS {
1361
1361
  }
1362
1362
  }
1363
1363
  hasSection(type) {
1364
- if (type === "header") return !!(document.querySelector("header") || document.querySelector('[class*="-header"]') || document.querySelector('[tagName$="-header"]'));
1365
- return !!(document.querySelector("footer") || document.querySelector('[class*="-footer"]') || document.querySelector('[tagName$="-footer"]'));
1364
+ const slug = type === "header" ? "/header" : "/footer";
1365
+ for (const [, info] of this.managedElements) {
1366
+ if (info.sectionSlug === slug) return true;
1367
+ }
1368
+ return false;
1366
1369
  }
1367
1370
  async loadPageContent(status) {
1368
1371
  this.setLoading(true);