mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 19:47:00 +03:00
Fixed includes check
This commit is contained in:
2
index.js
2
index.js
@@ -58,7 +58,7 @@ app.get('/api/getVideoSponsorTimes', function (req, res) {
|
|||||||
privateDB.prepare("SELECT hashedIP FROM sponsorTimes WHERE videoID = ?").all(videoID, (err, rows) => resolve({err, rows}));
|
privateDB.prepare("SELECT hashedIP FROM sponsorTimes WHERE videoID = ?").all(videoID, (err, rows) => resolve({err, rows}));
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result.rows.length == 0 || !result.rows.includes({hashedIP})) {
|
if (!result.rows.some((e) => e.hashedIP === hashedIP)) {
|
||||||
//this isn't their ip, don't send it to them
|
//this isn't their ip, don't send it to them
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user