diff --git a/src/server.ts b/src/server.ts index 67a3c63..9ef1d83 100644 --- a/src/server.ts +++ b/src/server.ts @@ -10,7 +10,7 @@ async function reload(): Promise { console.log("Loading Dining API..."); const parser = new DiningParser(); const locations = await parser.process(); - if (locations.length < cachedLocations.length - 1) { + if (cachedLocations && locations.length < cachedLocations.length - 1) { console.log( "Ignored location fetch since it (likely) has missing data", locations