From 5ac05707e12d014ff2c7dc9669335b3d8ec737e7 Mon Sep 17 00:00:00 2001 From: Diana Olarte Date: Thu, 5 Dec 2024 19:25:28 +1100 Subject: [PATCH] fix: validate dateJoined has to display the modal --- src/components/modal-tos/ModalToS.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/modal-tos/ModalToS.jsx b/src/components/modal-tos/ModalToS.jsx index 0390e4b30..23d63ddcd 100644 --- a/src/components/modal-tos/ModalToS.jsx +++ b/src/components/modal-tos/ModalToS.jsx @@ -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; }