mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-15 07:57:05 +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;
|
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]);
|
cache.shadowHiddenSegmentIPs[videoID] = privateDB.prepare('all', 'SELECT hashedIP FROM sponsorTimes WHERE videoID = ?', [videoID]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user