opti: do not execute postInit if getHtml is null

This commit is contained in:
2023-11-29 16:18:54 +01:00
parent d5e692449b
commit 07d06253ba
3 changed files with 8 additions and 9 deletions

View File

@ -59,7 +59,11 @@ const router = async () => {
}
const view = new match.route.view(getParams(match));
document.querySelector("#app").innerHTML = await view.getHtml();
let content = await view.getHtml();
if (content == null)
return;
document.querySelector("#app").innerHTML = content
await view.postInit();
};