Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const FastBitSet = require('fastbitset');
const booleanParser = require('boolean-parser');

const clone = function(val) {


try {
return JSON.parse(JSON.stringify(val));
Expand Down Expand Up @@ -356,7 +357,8 @@ const getBuckets = function(data, input, aggregations) {

let doc_count = v2[1].array().length;

if (hide_zero_doc_count && doc_count === 0) {
//hide zero_doc_count facet only if it is not selected
if (hide_zero_doc_count && doc_count === 0 && filters.indexOf(v2[0]) === -1) {
return;
}

Expand Down