From 2cf89b1850a682bbf6d5d98ff97e500d03701b55 Mon Sep 17 00:00:00 2001 From: Michael C Date: Fri, 7 Jan 2022 02:00:04 -0500 Subject: [PATCH] fix "cannot read properties of null" when voting on full video tag --- src/utils/noticeUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/noticeUtils.ts b/src/utils/noticeUtils.ts index 5d77063b..e2489f74 100644 --- a/src/utils/noticeUtils.ts +++ b/src/utils/noticeUtils.ts @@ -16,6 +16,6 @@ export function downvoteButtonColor(segments: SponsorTime[], actionState: SkipNo return (actionState === downvoteType) ? Config.config.colorPalette.red : Config.config.colorPalette.white; } else { // You dont have segment selectors so the lockbutton needs to be colored and cannot be selected. - return Config.config.isVip && segments[0].locked === 1 ? Config.config.colorPalette.locked : Config.config.colorPalette.white; + return Config.config.isVip && segments?.[0].locked === 1 ? Config.config.colorPalette.locked : Config.config.colorPalette.white; } } \ No newline at end of file