Skip to content

Commit

Permalink
fix: hide semester error when undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
iceghost committed Jan 7, 2024
1 parent 43e6ef9 commit c8ec264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
let name: string;
$: timetable = process(raw, kind);
$: if (!`${semester}`.match(/^\d+[123]$/)) {
$: if (semester !== undefined && !`${semester}`.match(/^\d+[123]$/)) {
error = new Error('mã học kỳ sai định dạng. ví dụ mã đúng: 231, 232, 233.');
} else {
error = null;
Expand Down

0 comments on commit c8ec264

Please sign in to comment.