Set filter to undefined when it's empty on findExceptionLists method (#128455)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
David Sánchez 2022-03-29 12:44:31 +02:00 committed by GitHub
parent bf2769d7ee
commit a07c47c652
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 1 deletions

View file

@ -231,7 +231,7 @@ const fetchExceptionLists = async ({
signal,
}: ApiCallFetchExceptionListsProps): Promise<FoundExceptionListSchema> => {
const query = {
filter: filters,
filter: filters || undefined,
namespace_type: namespaceTypes,
page: pagination.page ? `${pagination.page}` : '1',
per_page: pagination.perPage ? `${pagination.perPage}` : '20',