Skip to content

Commit

Permalink
Fix issue with saved search visualizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Roes committed Mar 20, 2018
1 parent ba9a882 commit 0e3b5f1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ui/public/vis/request_handlers/courier.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ const CourierRequestHandlerProvider = function (Private, courier, timefilter) {
return true;
}

const timeFieldName = searchSource.index().timeFieldName;
const index = searchSource.index() || searchSource.getParent().index();
const timeFieldName = index.timeFieldName;
if (!timeFieldName) {
return true;
}

// Only check if we need to filter out this filter if it's actual a range filter
// on our time field and not any other field.
if (!filter.range[timeFieldName]) {
return true;
}

return !(state.filters || []).find(f => f.range && f.range[timeFieldName]);
});

Expand Down

0 comments on commit 0e3b5f1

Please sign in to comment.