Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
style: fewer casts
Browse files Browse the repository at this point in the history
  • Loading branch information
lishaduck committed Jan 14, 2024
1 parent 93d47c1 commit 76f56f4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,12 @@ async function applySavedProfiles(): Promise<void> {
for (let f = 1; f < (profiles[i]?.length ?? 0) + 1; f++) {
createCourse(f, i);
const roomInput = document.getElementById(`rmnum${f}${i}txt`);
const nameInput = document.getElementById(
`cl${f}${i}txt`,
) as HTMLInputElement;
const nameInput = document.getElementById(`cl${f}${i}txt`);

if (roomInput instanceof HTMLInputElement) {
if (
roomInput instanceof HTMLInputElement &&
nameInput instanceof HTMLInputElement
) {
const parsedRoom = roomSchema.safeParse(profiles[i]?.[f - 1]?.[0]);

if (parsedRoom.success) {
Expand Down

0 comments on commit 76f56f4

Please sign in to comment.