Fixed includes check

This commit is contained in:
Ajay Ramachandran
2019-08-22 14:18:31 -04:00
parent 49af7dd65d
commit 58d3699a06

View File

@@ -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}));
});
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
continue;
}