Merge pull request #1125 from mchangrh/fixPillError

fix "cannot read properties of null" when voting on full video tag
This commit is contained in:
Ajay Ramachandran
2022-01-07 02:03:12 -05:00
committed by GitHub

View File

@@ -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;
}
}