From 91851ce3e960351aa32adef7437289cdbf406e58 Mon Sep 17 00:00:00 2001 From: ybouane Date: Mon, 21 Oct 2024 22:36:56 -0400 Subject: [PATCH] Bug correction negate needs to be set as false by default --- watcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watcher.js b/watcher.js index e414eb5..658393f 100644 --- a/watcher.js +++ b/watcher.js @@ -14,7 +14,7 @@ const statusFile = './static/status.json'; const delay = async t=>new Promise(r=>setTimeout(r, t)); const handlize = s=>s.toLowerCase().replace(/[^a-z0-9]/g, ' ').trim().replace(/\s+/g, '-'); -const checkContent = async (content, criterion, negate) => { +const checkContent = async (content, criterion, negate=false) => { if(typeof criterion=='string') { return content.includes(criterion)!=negate; } else if(Array.isArray(criterion)) {