Skip to content

Commit

Permalink
fix: Fixed typescript error (#161)
Browse files Browse the repository at this point in the history
* fix: fixed bug where activeSchedule doesn't update correctly

* refactor: always returning activeSchedule

* style: prettier

* fix: fixed typescript error

* style: prettier
  • Loading branch information
knownotunknown authored Mar 14, 2024
1 parent a409090 commit df7a7c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/hooks/useSchedules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export default function useSchedules(): [active: UserSchedule, schedules: UserSc

export function getActiveSchedule(): UserSchedule {
return (
schedulesCache[activeIndexCache] || new UserSchedule({ courses: [], name: 'An error has occurred', hours: 0 })
schedulesCache[activeIndexCache] ||
new UserSchedule({ courses: [], name: 'An error has occurred', hours: 0, updatedAt: Date.now() })
);
}

Expand Down

0 comments on commit df7a7c6

Please sign in to comment.