mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-12 22:47:12 +03:00
fix crash when variable missing from cache
This commit is contained in:
@@ -19,7 +19,7 @@ function prepareCategorySegments(req: Request, videoID: VideoID, category: Categ
|
||||
return true;
|
||||
}
|
||||
|
||||
if (cache.shadowHiddenSegmentIPs[videoID] === undefined) {
|
||||
if (cache?.shadowHiddenSegmentIPs[videoID] === undefined) {
|
||||
cache.shadowHiddenSegmentIPs[videoID] = privateDB.prepare('all', 'SELECT hashedIP FROM sponsorTimes WHERE videoID = ?', [videoID]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user