mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-26 17:38:28 +03:00
Fix undefined error
This commit is contained in:
@@ -47,10 +47,10 @@ export async function getFromITube (videoID: string): Promise<innerTubeVideoDeta
|
|||||||
if (e instanceof AxiosError) {
|
if (e instanceof AxiosError) {
|
||||||
const result = e.response;
|
const result = e.response;
|
||||||
|
|
||||||
if (result.status === 500) {
|
if (result && result.status === 500) {
|
||||||
return privateResponse(videoID, result.data ?? "Bad response");
|
return privateResponse(videoID, result.data ?? "Bad response");
|
||||||
} else {
|
} else {
|
||||||
return Promise.reject(`Floatie returned non-200 response: ${result.status}`);
|
return Promise.reject(`Floatie returned non-200 response: ${result?.status}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user