diff --git a/frontend/static/js/views/accounts/LoginView.js b/frontend/static/js/views/accounts/LoginView.js index b9a6621..b751328 100644 --- a/frontend/static/js/views/accounts/LoginView.js +++ b/frontend/static/js/views/accounts/LoginView.js @@ -35,15 +35,17 @@ export default class extends AbstractView { async postInit() { + let login_button = document.getElementById("button") + if (login_button != null) + login_button.onclick = login; + } + + async getHtml() { if (await client.isAuthentificate()) { navigateTo("/home") return; } - document.getElementById("button").onclick = login; - } - - async getHtml() { return `