From 626bcde48d72634018d94e1331e58cf0cde443e5 Mon Sep 17 00:00:00 2001 From: Alessandro Cifani Date: Fri, 20 Sep 2024 10:18:12 +0200 Subject: [PATCH] fix: nullish coalesce --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index fb92c45..c0f37fa 100644 --- a/index.ts +++ b/index.ts @@ -25,7 +25,7 @@ const server = app.listen(port, () => { // Refresh Actual data at a given frequence const intervalID = setInterval(() => { actual.init().then(() => console.log('Actual DB refreshed')); -}, Number(process.env.ACTUAL_REFRESH_INTERVAL_SECONDS) * 1000 ?? 60_000); +}, (Number(process.env.ACTUAL_REFRESH_INTERVAL_SECONDS) || 60) * 1000); process.on('SIGTERM', shutdown); process.on('SIGINT', shutdown);