From 9c8c9c9d3c6118119674ee79035214555c2e4922 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sun, 21 Jun 2026 02:04:34 +0200 Subject: [PATCH] style: format static/login.ts --- static/login.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/static/login.ts b/static/login.ts index 2437f4c..375317e 100644 --- a/static/login.ts +++ b/static/login.ts @@ -1,15 +1,21 @@ const initPasswordToggle = (): void => { document.addEventListener("click", (event) => { - const target = event.target; - if (!(target instanceof Element)) return; + const { target } = event; + if (!(target instanceof Element)) { + return; + } const button = target.closest("[data-toggle-password]"); - if (!button) return; + if (!button) { + return; + } const field = button.closest("form")?.querySelector("#password"); const openEye = button.querySelector("[data-eye-open]"); const closedEye = button.querySelector("[data-eye-closed]"); - if (!(field instanceof HTMLInputElement) || !openEye || !closedEye) return; + if (!(field instanceof HTMLInputElement) || !openEye || !closedEye) { + return; + } const showPassword = field.type === "password"; field.type = showPassword ? "text" : "password";