Skip to content

Commit

Permalink
Handling asynchronous prestashop.checkPasswordScore
Browse files Browse the repository at this point in the history
  • Loading branch information
Oksydan committed Oct 23, 2022
1 parent 1de4376 commit d11b040
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _dev/js/components/usePasswordPolicy.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ const getPasswordStrengthFeedback = (
}
};

const watchPassword = (
const watchPassword = async (
elementInput,
feedbackContainer,
hints,
) => {
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 = [];
Expand Down

0 comments on commit d11b040

Please sign in to comment.