Skip to content

Commit

Permalink
Facet filter crash (#4769)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin authored Jan 16, 2025
1 parent 80765ea commit 86cefcd
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,18 @@ const FacetFilters = observer(function ({

let currentRows = rows
for (const facet of ret) {
const elt = uniqs.get(facet)!
for (const row of currentRows) {
const key = getRowStr(facet, row)
const val = elt.get(key)
// we don't allow filtering on empty yet
if (key) {
if (val === undefined) {
elt.set(key, 1)
} else {
elt.set(key, val + 1)
const elt = uniqs.get(facet)
if (elt) {
for (const row of currentRows) {
const key = getRowStr(facet, row)
const val = elt.get(key)
// we don't allow filtering on empty yet
if (key) {
if (val === undefined) {
elt.set(key, 1)
} else {
elt.set(key, val + 1)
}
}
}
}
Expand Down

0 comments on commit 86cefcd

Please sign in to comment.