From 58d3699a06cb266382c76429f53fe1a9c16cdba6 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 22 Aug 2019 14:18:31 -0400 Subject: [PATCH] Fixed includes check --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index b0117aa..ca7dab7 100644 --- a/index.js +++ b/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})); }); - 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; }