diff --git a/src/components/NoticeComponent.tsx b/src/components/NoticeComponent.tsx index fc514ec5..c317c0c1 100644 --- a/src/components/NoticeComponent.tsx +++ b/src/components/NoticeComponent.tsx @@ -274,8 +274,8 @@ class NoticeComponent extends React.Component { if (countdownTime == 3) { //start fade out animation const notice = document.getElementById("sponsorSkipNotice" + this.idSuffix); - notice.style.removeProperty("animation"); - notice.classList.add("sponsorSkipNoticeFadeOut"); + notice?.style.removeProperty("animation"); + notice?.classList.add("sponsorSkipNoticeFadeOut"); } this.setState({