From 15c5beaecd40b69bb7780865264402c776282c21 Mon Sep 17 00:00:00 2001 From: Bauke Date: Sun, 25 Jun 2023 13:31:42 +0200 Subject: [PATCH] Use undefined instead of null. --- source/content-scripts/features/hide-votes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/content-scripts/features/hide-votes.ts b/source/content-scripts/features/hide-votes.ts index cce483a..f261741 100644 --- a/source/content-scripts/features/hide-votes.ts +++ b/source/content-scripts/features/hide-votes.ts @@ -112,7 +112,7 @@ function hideTopicVotes(data: HideVotesData, currentUser: string): number { (data.otherTopics && !postedBySelf) || (data.ownTopics && postedBySelf) ) { - vote = topic.querySelector(".topic-voting-votes")!; + vote = topic.querySelector(".topic-voting-votes") ?? undefined; } if (vote !== undefined) {