From 60f8fd37ad49efb16f1f1f28c83ffd8fe7c38e67 Mon Sep 17 00:00:00 2001 From: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> Date: Tue, 17 Sep 2024 09:45:08 -0400 Subject: [PATCH] dont add nulls and undefined to results --- lib/settings.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/settings.js b/lib/settings.js index 375fafb8..9683cb82 100644 --- a/lib/settings.js +++ b/lib/settings.js @@ -162,9 +162,6 @@ class Settings { return } - //remove nulls and undefined in the results - this.results = this.results.filter((thing) => thing ? true : false) - //remove duplicate rows in this.results this.results = this.results.filter((thing, index, self) => { return index === self.findIndex((t) => { @@ -827,7 +824,10 @@ ${this.results.reduce((x, y) => { appendToResults(res) { if (this.nop) { - this.results = this.results.concat(res.flat(3)) + //Remove nulls and undefined from the results + const results = res.flat(3).filter(r => r) + + this.results = this.results.concat(results) } }