Skip to content

Commit

Permalink
fix: validate dateJoined has to display the modal
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoa committed Dec 5, 2024
1 parent 3cfae4a commit 5ac0570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/modal-tos/ModalToS.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ const ModalToS = () => {
}
};

if (tosPreference || !dateIso8601 || !username
|| new Date(dateIso8601) < new Date(dateJoined)) {
if (tosPreference || !dateIso8601 || !username || !dateJoined
|| new Date(dateIso8601) <= new Date(dateJoined)) {
return null;
}

Expand Down

0 comments on commit 5ac0570

Please sign in to comment.