diff --git a/src/content.ts b/src/content.ts index 97e6ca8d..0aa6e64d 100644 --- a/src/content.ts +++ b/src/content.ts @@ -2199,15 +2199,18 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string { function windowListenerHandler(event: MessageEvent): void { const data = event.data; - const dataType = data.type + const dataType = data.type; if (data.source !== "sponsorblock") return; if (dataType === "navigation") { sponsorVideoID = data.videoID; - pageType = data.pageType - channelIDInfo = { - id: data.channelID, - status: ChannelIDStatus.Found + pageType = data.pageType; + + if (data.channelID) { + channelIDInfo = { + id: data.channelID, + status: ChannelIDStatus.Found + }; } } else if (dataType === "ad") { if (isAdPlaying != data.playing) {