Skip to content

Commit

Permalink
fix: do not allow undefined values to be push to filterValues (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 authored Aug 22, 2024
1 parent 6a6e2a9 commit 084ac07
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ export const getFilterHubRequestParams = <
// Note: If we need to support more of the logic operators in HubFilter in the future,
// we'll need to figure out how to express those on the FilterCategory objects
// and translate them here.
if (filterCategory.type === "numsearch") {
if (filterCategory.type === "numsearch" && serverFilterValue[0]) {
pushOrMergeFilter(filters, {
field: serverFilterField,
operator: "=",
value: Number(serverFilterValue[0]),
});
}
if (filterCategory.type === "search") {
if (filterCategory.type === "search" && serverFilterValue[0]) {
pushOrMergeFilter(filters, {
field: serverFilterField,
operator: "~",
Expand Down

0 comments on commit 084ac07

Please sign in to comment.