off-by-1 + await
This commit is contained in:
parent
a76d5e9d6c
commit
ea04b14749
|
@ -38,7 +38,7 @@ input:disabled + span {
|
|||
#header {
|
||||
--child-gap: 1rem;
|
||||
}
|
||||
#header-contents > :nth-last-child(n + 3) {
|
||||
#header-contents > :nth-last-child(n + 2) {
|
||||
margin-bottom: var(--child-gap);
|
||||
}
|
||||
#header.meta-init-error {
|
||||
|
|
|
@ -120,12 +120,13 @@ Object.assign(t, {
|
|||
},
|
||||
|
||||
async fetchTemplate(url, name) {
|
||||
return t.template[name] || download(url, {responseType: 'document'}).then(doc => {
|
||||
const el = doc.body.firstElementChild;
|
||||
let el = t.template[name];
|
||||
if (!el) {
|
||||
el = (await download(url, {responseType: 'document'})).body.firstElementChild;
|
||||
t.NodeList(el.getElementsByTagName('*'));
|
||||
t.template[name] = el;
|
||||
return el;
|
||||
});
|
||||
}
|
||||
return el;
|
||||
},
|
||||
|
||||
sanitizeHtml(root) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user