Skip to content

Commit

Permalink
Fix/fix caching (#155)
Browse files Browse the repository at this point in the history
* fix: don't update cache with data that's missing locations

* fix: yeah I'm dumb
  • Loading branch information
cirex-web authored Sep 9, 2024
1 parent ebe66fe commit 72beaa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function reload(): Promise<void> {
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
Expand Down

0 comments on commit 72beaa4

Please sign in to comment.