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

@ -30,14 +30,11 @@ export default class extends AbstractView {
async postInit()
{
let register_button = document.getElementById("button")
if (register_button != null)
register_button.onclick = register;
document.getElementById("button").onclick = register;
}
async getHtml() {
if (client.isAuthentificate())
if (await client.isAuthentificate())
{
navigateTo("/home")
return;