diff options
author | Ajay Ramachandran <[email protected]> | 2020-05-11 20:45:48 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2020-05-11 20:45:48 -0400 |
commit | c68aabaa4080a7c6ccb79126b30e874a08fdca1a (patch) | |
tree | 10c8229cddabec1cabe051addaf70a142b24cdc5 /src/components/SubmissionNoticeComponent.tsx | |
parent | 70239bc04583a1e10e23c0c99469cf46ac7d3c56 (diff) | |
download | SponsorBlock-c68aabaa4080a7c6ccb79126b30e874a08fdca1a.tar.gz SponsorBlock-c68aabaa4080a7c6ccb79126b30e874a08fdca1a.zip |
Added null coalescence checks to video info
Diffstat (limited to 'src/components/SubmissionNoticeComponent.tsx')
-rw-r--r-- | src/components/SubmissionNoticeComponent.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/SubmissionNoticeComponent.tsx b/src/components/SubmissionNoticeComponent.tsx index de7d4df9..a380fd73 100644 --- a/src/components/SubmissionNoticeComponent.tsx +++ b/src/components/SubmissionNoticeComponent.tsx @@ -161,7 +161,7 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S } // Check if any non music categories are being used on a music video - if (this.contentContainer().videoInfo.microformat.playerMicroformatRenderer.category === "Music") { + if (this.contentContainer().videoInfo?.microformat?.playerMicroformatRenderer?.category === "Music") { let sponsorTimesSubmitting = this.props.contentContainer().sponsorTimesSubmitting; for (const sponsorTime of sponsorTimesSubmitting) { if (!sponsorTime.category.startsWith("music_")) { |