Handle empty values in convertFiltersToBackendFormat (#4326)
# What this PR does
Handle empty values in convertFiltersToBackendFormat
## Which issue(s) this PR closes
Broken Insights page
## Checklist
- [ ] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
show up in the autogenerated release notes.
This commit is contained in:
parent
01cb87cd62
commit
cfec0020ad
1 changed files with 1 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ export const getApiPathByPage = (page: string) => {
|
|||
);
|
||||
};
|
||||
|
||||
export const convertFiltersToBackendFormat = (filters: FiltersValues, filterOptions: FilterOption[]) => {
|
||||
export const convertFiltersToBackendFormat = (filters: FiltersValues = {}, filterOptions: FilterOption[] = []) => {
|
||||
const newFilters = { ...filters };
|
||||
filterOptions.forEach((filterOption) => {
|
||||
if (filterOption.type === 'daterange' && newFilters[filterOption.name]) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue