Skip to content

Commit

Permalink
Fix null check for existing user case
Browse files Browse the repository at this point in the history
  • Loading branch information
navzam committed Oct 30, 2024
1 parent 5e90c6c commit 07bc1fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parentalConsent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 07bc1fd

Please sign in to comment.