diff --git a/src/js/components/usePasswordPolicy.ts b/src/js/components/usePasswordPolicy.ts index 6359e379f..194afd06d 100644 --- a/src/js/components/usePasswordPolicy.ts +++ b/src/js/components/usePasswordPolicy.ts @@ -70,7 +70,7 @@ const getPasswordStrengthFeedback = ( } }; -const watchPassword = ( +const watchPassword = async ( elementInput: HTMLInputElement, feedbackContainer: HTMLElement, hints: Record, @@ -78,7 +78,7 @@ const watchPassword = ( const {prestashop} = window; const passwordValue = elementInput.value; const elementIcon = feedbackContainer.querySelector(PasswordPolicyMap.requirementScoreIcon); - const result = prestashop.checkPasswordScore(passwordValue); + const result = await prestashop.checkPasswordScore(passwordValue); const feedback = getPasswordStrengthFeedback(result.score); const passwordLength = passwordValue.length; const popoverContent:string[] = [];