fix wa-page fallback loading in free repo (#1359)

This commit is contained in:
Konnor Rogers
2025-08-21 14:12:39 -04:00
committed by GitHub
parent e016e4bd48
commit adaea2fa5f

View File

@@ -26,5 +26,17 @@
{% endfor %}
<link rel="stylesheet" href="/dist/styles/webawesome.css" />
<script type="module">
document.addEventListener("wa-discovery-complete", loadLayout)
function loadLayout () {
if (!customElements.get("wa-layout")) {
import("{% cdnUrl 'components/page/page.js' %}")
.catch((e) => {
// known errors with dual registration. This is only a thing in the free repo.
})
}
}
</script>
{# Used by Web Awesome App to inject other assets into the head. #}
{% server "head" %}