Skip to content

Commit

Permalink
Merge pull request #2246 from thostetler/fix-facet-child-queries
Browse files Browse the repository at this point in the history
Append `/` to children facet queries
  • Loading branch information
shinyichen committed Jun 3, 2022
2 parents 52201ea + f3f9e18 commit 752b914
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/widgets/facet/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ define([
// we don't need actual records so set rows to 1
q.set('rows', 1);
// set prefix from 0/ to 1/
if (id) q.set('facet.prefix', id.replace('0/', '1/'));
if (id) {
// append '/' so that we properly match the prefix
const childPrefix = id.replace('0/', '1/') + '/';
q.set('facet.prefix', childPrefix);
}

var req = this.composeRequest(q);
pubsub.publish(pubsub.DELIVERING_REQUEST, req);
Expand Down

0 comments on commit 752b914

Please sign in to comment.