mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-11 20:08:56 +00:00
fix wa-page fallback loading in free repo (#1359)
This commit is contained in:
@@ -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" %}
|
||||
|
||||
Reference in New Issue
Block a user