fix: negative or zero number
All checks were successful
Build and Deploy Angular App / build (push) Successful in 1m1s
All checks were successful
Build and Deploy Angular App / build (push) Successful in 1m1s
This commit is contained in:
parent
dba0d3cd62
commit
80ab5c9b50
@ -108,6 +108,11 @@ export class ScheduleComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get currentWeek(): number {
|
get currentWeek(): number {
|
||||||
return (weekInYear(this.startWeek) - weekInYear(this.startTerm)) + 1;
|
let result = (weekInYear(this.startWeek) - weekInYear(this.startTerm)) + 1;
|
||||||
|
|
||||||
|
if (result <= 0)
|
||||||
|
result = 1;
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user