Skip to content

Commit 6edc70f

Browse files
authored
fix the loading row remains even after the plugins are loaded (#730)
* fix the loading row remains even after the plugins are loaded * empty table more in line with standard * load lit-html with specific version * remove loading after fetch response * fix removeChild element
1 parent 7c52901 commit 6edc70f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

site/layouts/partials/footer.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
</script>
6464

6565
<script type="module">
66-
import {html, render} from 'https://unpkg.com/lit-html?module';
66+
import {html, render} from 'https://unpkg.com/lit-html@2.0.1?module';
6767
const repoLink = repo => repo
6868
? html`<a href="${repo}" rel="nofollow"><img src="https://img.shields.io/github/stars/${repo}.svg?label=stars&logo=github"/></a>`
6969
: html``;
@@ -86,6 +86,11 @@
8686
const resp = await fetch('/.netlify/functions/api/plugins');
8787
const json = await resp.json()
8888
const plugins = json.data?.plugins;
89+
90+
while (pluginTableElem.firstChild) {
91+
pluginTableElem.removeChild(pluginTableElem.firstChild);
92+
}
93+
8994
if (!Boolean(plugins?.length)) {
9095
render(error(), pluginTableElem);
9196
return;

0 commit comments

Comments
 (0)