Skip to content

Commit

Permalink
fix(ui): error in filter options for null strings (#225)
Browse files Browse the repository at this point in the history
* fix: error in filter options for null strings

* fix: lint errors

Co-authored-by: Andreas Hochsteger <[email protected]>
  • Loading branch information
ahochsteger and ahochsteger authored Jan 13, 2021
1 parent 595b97e commit 165ca0e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modules/NodeCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ export class NodeCollection {
values (property) {
const uniqueMap = {}
this.nodes.forEach(node => {
const strVal = this._strValue(node[property])
uniqueMap[strVal] = uniqueMap[strVal] || node[property]
if (node[property]) {
const strVal = this._strValue(node[property])
uniqueMap[strVal] = uniqueMap[strVal] || node[property]
}
})
return Object.keys(uniqueMap)
.sort()
Expand Down

0 comments on commit 165ca0e

Please sign in to comment.