Skip to content

Commit

Permalink
Refactor to improve readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Aug 25, 2020
1 parent 7e588ed commit 61e9c94
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export const getMonitorStatus: UMElasticsearchQueryFn<
},
},
},
// append user filters, if defined
...(filters?.bool ? [filters] : []),
],
},
},
Expand Down Expand Up @@ -116,10 +118,6 @@ export const getMonitorStatus: UMElasticsearchQueryFn<
},
};

if (filters?.bool) {
esParams.body.query.bool.filter.push(filters);
}

/**
* Perform a logical `and` against the selected location filters.
*/
Expand Down

0 comments on commit 61e9c94

Please sign in to comment.