Skip to content

Commit

Permalink
lib: Add minimum progress value
Browse files Browse the repository at this point in the history
  • Loading branch information
skobyda authored and martinpitt committed Oct 31, 2023
1 parent 6a9640c commit f2a8d07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/lib/cockpit-components-password.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export const PasswordFormFields = ({
else
variant = "danger";

let passwordStrengthValue = Number.isInteger(passwordStrength) ? passwordStrength : 0;
let passwordStrengthValue = Number.isInteger(passwordStrength) ? Number.parseInt(passwordStrength) : -1;
if (password !== "" && (passwordStrengthValue >= 0 && passwordStrengthValue < 25))
passwordStrengthValue = 25;

return (
<>
Expand Down

0 comments on commit f2a8d07

Please sign in to comment.