mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-12 14:37:17 +03:00
catch and throw error outside of if
This commit is contained in:
@@ -125,10 +125,8 @@ async function getSegmentsByHash(req: Request, hashedVideoIDPrefix: VideoIDHash,
|
|||||||
|
|
||||||
return segments;
|
return segments;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err) {
|
Logger.error(err as string);
|
||||||
Logger.error(err as string);
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user