From bcfc8628b039d22b6d37b14d4a357c631ae2e7c6 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Thu, 17 Feb 2022 12:34:57 -0600 Subject: [PATCH] sendMarketCloseEmails: check undefined --- functions/src/market-close-emails.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/functions/src/market-close-emails.ts b/functions/src/market-close-emails.ts index 83caca89..6b490e9d 100644 --- a/functions/src/market-close-emails.ts +++ b/functions/src/market-close-emails.ts @@ -26,6 +26,7 @@ async function sendMarketCloseEmails() { if ( contract.resolution || (contract.closeEmailsSent ?? 0) >= 1 || + contract.closeTime === undefined || (contract.closeTime ?? 0) > Date.now() ) return undefined