icssc / AntAlmanac

A course exploration and scheduling tool for UCI Anteaters
https://antalmanac.com
MIT License
56 stars 70 forks source link

fix: handle undefined buildings #928

Closed KevinWu098 closed 7 months ago

KevinWu098 commented 7 months ago

Summary

  1. The de-duplication / cleanup in #912 breaks schedules that used the removed locations, or more specifically, their IDs.
  2. This PR is a hotfix to handle those undefined values more gracefully as empty strings, but it's not a full fix / undoing of the regression.

Test Plan

  1. Create a custom event with a location
  2. Comment out location in buildingCatalogue.ts
  3. See if clicking the Calendar Event errors out
  4. See if opening Added errors out

Issues

Closes bug report:

Feedback Type Issue / Bug Feedback It says: "Unexpected Application Error! Cannot read properties of undefined (reading 'name') TypeError: Cannot read properties of undefined (reading 'name')