Skip to content

Commit

Permalink
Fix substituted period elements
Browse files Browse the repository at this point in the history
  • Loading branch information
arnimattr committed Nov 26, 2022
1 parent b5ebd46 commit 7e484a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/wrappers/Period.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class Period {
*/
deviatesFromSchedule = (): boolean =>
this.substitutionText !== null ||
this.lessonCode !== "regular" ||
this.lessonCode === "cancelled" ||
Object.values(this.elements)
.flat()
.some((element) => element.isSubstituted());
Expand Down Expand Up @@ -285,6 +285,9 @@ export class Period {
* Wrapper around an element included in a {@link Period}.
*/
export class PeriodElement {
originalId?: number = undefined;
originalName?: string = undefined;

constructor(
/**
* Id of the element.
Expand Down

0 comments on commit 7e484a5

Please sign in to comment.