Skip to content

Commit fd00ae0

Browse files
committed
reverted bcrypt.js changes
1 parent 4c99e9e commit fd00ae0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

bcrypt.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,10 @@ module.exports.genSalt = function genSalt(rounds, minor, cb) {
8787
/// @param {String} salt the salt to use when hashing
8888
/// @return {String} hash
8989
module.exports.hashSync = function hashSync(data, salt) {
90-
9190
if (data == null || salt == null) {
9291
throw new Error('data and salt arguments required');
9392
}
94-
95-
if (salt === '') {
96-
throw new Error('Salt cannot be empty');
97-
}
93+
9894
if (typeof data !== 'string' || (typeof salt !== 'string' && typeof salt !== 'number')) {
9995
throw new Error('data must be a string and salt must either be a salt string or a number of rounds');
10096
}

0 commit comments

Comments
 (0)