From 07bc1fd68e1c2195416ca3128dfc3e58a1364b1b Mon Sep 17 00:00:00 2001 From: Nafis Zaman Date: Wed, 30 Oct 2024 11:26:23 -0700 Subject: [PATCH] Fix null check for existing user case --- parentalConsent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parentalConsent.js b/parentalConsent.js index 7ff13dde..68c3cf66 100644 --- a/parentalConsent.js +++ b/parentalConsent.js @@ -187,7 +187,7 @@ function createRouter(firebaseTokenManager, mailgunClient, config) { const now = Date.now(); let expiresAt = null; - if (currentConsent?.legalAcceptance === null) { + if (!currentConsent?.legalAcceptance) { // Existing user consenting for the first time, so give them 7 days expiresAt = new Date(now); expiresAt.setUTCHours(expiresAt.getUTCHours() + 7 * 24);