Skip to content

Commit

Permalink
fix date validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jupe committed Mar 25, 2024
1 parent f90eef6 commit aab19c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/loan.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function objectToArrayOfObjects(obj) {

// Makes sure the provided date is valid
function isValidDate(date) {
return date !== 'Invalid Date' && !Number.isNaN(date);
return date !== 'Invalid Date' && !Number.isNaN(Number(date));
}


Expand Down

0 comments on commit aab19c5

Please sign in to comment.