fix: null check headshot
All checks were successful
.NET / Build & Test (push) Successful in 1m29s

This commit is contained in:
Oliver Booth 2024-03-02 05:32:27 +00:00
parent 18cb6aa806
commit 5fae03b483
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5

View File

@ -107,6 +107,7 @@ declare const Prism: any;
let avatarType = 0;
const headshot = document.getElementById("index-headshot") as HTMLImageElement;
if (headshot) {
headshot.addEventListener("click", (ev: MouseEvent) => {
if (avatarType === 0) {
headshot.classList.add("headshot-spin", "headshot-spin-start");
@ -134,4 +135,5 @@ declare const Prism: any;
}, 400);
}
});
}
})();