Skip to content

Commit 1b12778

Browse files
committed
updating and simplifing the final check of password-validator file
1 parent 3919856 commit 1b12778

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Sprint-3/3-stretch/password-validator.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ function passwordValidator(password) {
1919
if (!hasSpecial) {
2020
return false;
2121
}
22-
23-
if (oldPassword.includes(password)) {
24-
return false;
25-
}
26-
return true;
22+
return !oldPassword.includes(password);
2723
}
2824
module.exports = passwordValidator;

0 commit comments

Comments
 (0)