From 9b1ca1a6c6c742e30a72a247ee63a6257b0df996 Mon Sep 17 00:00:00 2001 From: cirex Date: Sun, 8 Sep 2024 23:27:50 -0400 Subject: [PATCH] fix: semantics (#156) --- src/server.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server.ts b/src/server.ts index 9ef1d83..8bc9c4b 100644 --- a/src/server.ts +++ b/src/server.ts @@ -10,7 +10,10 @@ async function reload(): Promise { console.log("Loading Dining API..."); const parser = new DiningParser(); const locations = await parser.process(); - if (cachedLocations && locations.length < cachedLocations.length - 1) { + if ( + cachedLocations !== undefined && + locations.length < cachedLocations.length - 1 + ) { console.log( "Ignored location fetch since it (likely) has missing data", locations