mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-08 16:34:45 +08:00
chore: return if element is null to avoid errors
This commit is contained in:
parent
3879e58f93
commit
3e1c8f2f56
1 changed files with 5 additions and 1 deletions
|
|
@ -111,7 +111,11 @@ export function initYearSelector(
|
|||
}
|
||||
|
||||
function updateMonths(months: TestActivityMonth[]): void {
|
||||
const element = document.querySelector(".testActivity .months") as Element;
|
||||
const element = document.querySelector(".testActivity .months");
|
||||
|
||||
if (element === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
element.innerHTML = months
|
||||
.map(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue