fix(editor): Make submit in ChangePasswordView work again (#11227)
Some checks failed
Test Master / install-and-build (push) Has been cancelled
Test Master / Unit tests (18.x) (push) Has been cancelled
Test Master / Unit tests (20.x) (push) Has been cancelled
Test Master / Unit tests (22.4) (push) Has been cancelled
Test Master / Lint (push) Has been cancelled
Test Master / Notify Slack on failure (push) Has been cancelled

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-10-11 18:26:43 +02:00 committed by GitHub
parent 0d23a7fb5b
commit 4f27b39b45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,12 +47,7 @@ const getMfaEnabled = () => {
return router.currentRoute.value.query.mfaEnabled === 'true' ? true : false;
};
const isFormWithMFAToken = (values: { [key: string]: string }): values is { mfaToken: string } => {
return 'mfaToken' in values;
};
const onSubmit = async (values: { [key: string]: string }) => {
if (!isFormWithMFAToken(values)) return;
try {
loading.value = true;
const token = getResetToken();