Skip to content

Commit

Permalink
dont add nulls and undefined to results
Browse files Browse the repository at this point in the history
  • Loading branch information
decyjphr committed Sep 17, 2024
1 parent 87b8a95 commit 60f8fd3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 60f8fd3

Please sign in to comment.