aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/content.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content.ts b/src/content.ts
index 5128b4e6..68566389 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -618,7 +618,7 @@ function sponsorsLookup(id: string) {
videoID: id,
categories
}).then(async (response: FetchResponse) => {
- if (response.ok) {
+ if (response?.ok) {
let recievedSegments: SponsorTime[] = JSON.parse(response.responseText);
if (!recievedSegments.length) {
console.error("[SponsorBlock] Server returned malformed response: " + JSON.stringify(recievedSegments));
@@ -662,7 +662,7 @@ function sponsorsLookup(id: string) {
}
sponsorLookupRetries = 0;
- } else if (response.status === 404) {
+ } else if (response?.status === 404) {
sponsorDataFound = false;
//check if this video was uploaded recently