From 6d2bf1f0847fa61897f7c39f8c2d40d43df0d58d Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 24 Mar 2026 16:09:45 +0100 Subject: [PATCH] fix: resolve TDZ error on password update settings page Move the watchEffect call after the validate function declaration to fix "Cannot access 'c' before initialization" error that occurred when visiting the password update page with validateInitially=true. Fixes #2463 --- frontend/src/components/input/Password.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/input/Password.vue b/frontend/src/components/input/Password.vue index 8d7b6461d..919b14592 100644 --- a/frontend/src/components/input/Password.vue +++ b/frontend/src/components/input/Password.vue @@ -60,13 +60,13 @@ const password = ref('') const isValid = ref(props.validateInitially === true ? true : '') const validateAfterFirst = ref(false) -watchEffect(() => props.validateInitially && validate()) - const validate = useDebounceFn(() => { const valid = validatePassword(password.value, props.validateMinLength) isValid.value = valid === true ? true : t(valid) }, 100) +watchEffect(() => props.validateInitially && validate()) + function togglePasswordFieldType() { passwordFieldType.value = passwordFieldType.value === 'password' ? 'text'