Skip to content

Commit 3e1c8f2

Browse files
committed
chore: return if element is null to avoid errors
1 parent 3879e58 commit 3e1c8f2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/ts/elements/test-activity.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ export function initYearSelector(
111111
}
112112

113113
function updateMonths(months: TestActivityMonth[]): void {
114-
const element = document.querySelector(".testActivity .months") as Element;
114+
const element = document.querySelector(".testActivity .months");
115+
116+
if (element === null) {
117+
return;
118+
}
115119

116120
element.innerHTML = months
117121
.map(

0 commit comments

Comments
 (0)