You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do nvm use 16 and npm start on a freshly cloned version of the hydrant repository (after regenerating latest.json and npm install), I get this screen:
and if I go into the browser console I get the following error message:
Uncaught (in promise) TypeError: slot is not iterable
timeslots class.ts:63
Section class.ts:63
sections class.ts:120
Sections class.ts:120
sections class.ts:202
Class class.ts:198
State state.ts:68
State state.ts:67
useHydrant App.tsx:67
and the offending code in class.ts is
/** @param section - raw section info (timeslot and room) */
constructor(secs: Sections, rawTime: string, section: RawSection) {
this.secs = secs;
this.rawTime = rawTime;
const [rawSlots, room] = section;
this.timeslots = rawSlots.map((slot) => new Timeslot(...slot));
this.room = room;
}
This error appears in both my own branch and the freshly-cloned version, so I think this is likely an issue with the frontend or the current JSON schema, or possibly both.
The text was updated successfully, but these errors were encountered:
I recloned everything and the code magically fixed itself. Weird. One of these days I want to make a pull request that does input validation for latest.json. That said, I think it would actually be a lot cleaner to centralize all of the course data into a huge database and then expose that via an API wrapper.
Sorry, I didn't see this before :/ The issue was that efb5556 was present on deploy but not on main (after I inadvertently broke things in 548e5b2 and then forgot to push the fix to main for some reason).
When I do
nvm use 16
andnpm start
on a freshly cloned version of the hydrant repository (after regeneratinglatest.json
andnpm install
), I get this screen:and if I go into the browser console I get the following error message:
and the offending code in
class.ts
isThis error appears in both my own branch and the freshly-cloned version, so I think this is likely an issue with the frontend or the current JSON schema, or possibly both.
The text was updated successfully, but these errors were encountered: