mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-24 16:38:41 +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) {
|
||||
const result = e.response;
|
||||
|
||||
if (result.status === 500) {
|
||||
if (result && result.status === 500) {
|
||||
return privateResponse(videoID, result.data ?? "Bad response");
|
||||
} 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