From 731158c04962fcca49f0d865f9cf34771e895b63 Mon Sep 17 00:00:00 2001 From: Stojan Dimitrovski Date: Thu, 7 Dec 2023 10:27:27 +0100 Subject: [PATCH] fix: weak password error runtime type checks --- src/lib/fetch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/fetch.ts b/src/lib/fetch.ts index 359179d0f..7a63d1834 100644 --- a/src/lib/fetch.ts +++ b/src/lib/fetch.ts @@ -58,7 +58,7 @@ async function handleError(error: unknown) { data.weak_password && Array.isArray(data.weak_password.reasons) && data.weak_password.reasons.length && - data.weak_password.reduce((a: boolean, i: any) => a && typeof i === 'string', true) + data.weak_password.reasons.reduce((a: boolean, i: any) => a && typeof i === 'string', true) ) { throw new AuthWeakPasswordError( _getErrorMessage(data),