Skip to content

Commit 68323b8

Browse files
committed
Fix rebundant condition
1 parent 467dc01 commit 68323b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/lib/projets-validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function validateJoiDate(date, helpers) {
2222
return null
2323
}
2424

25-
if (!date || typeof date !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(date)) {
25+
if (typeof date !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(date)) {
2626
return helpers.message('Date invalide')
2727
}
2828

0 commit comments

Comments
 (0)