Skip to content

Commit 60f8fd3

Browse files
committed
dont add nulls and undefined to results
1 parent 87b8a95 commit 60f8fd3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/settings.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,6 @@ class Settings {
162162
return
163163
}
164164

165-
//remove nulls and undefined in the results
166-
this.results = this.results.filter((thing) => thing ? true : false)
167-
168165
//remove duplicate rows in this.results
169166
this.results = this.results.filter((thing, index, self) => {
170167
return index === self.findIndex((t) => {
@@ -827,7 +824,10 @@ ${this.results.reduce((x, y) => {
827824

828825
appendToResults(res) {
829826
if (this.nop) {
830-
this.results = this.results.concat(res.flat(3))
827+
//Remove nulls and undefined from the results
828+
const results = res.flat(3).filter(r => r)
829+
830+
this.results = this.results.concat(results)
831831
}
832832
}
833833

0 commit comments

Comments
 (0)