From a5b5e7a3a5407e59f51ee0b9f9eea87047a1ee5e Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 12 Jul 2023 04:34:30 +0300 Subject: [PATCH] Fixed: (UI) Prevent passing NaN values to search API when using invalid ids --- frontend/src/Search/SearchFooterConnector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Search/SearchFooterConnector.js b/frontend/src/Search/SearchFooterConnector.js index 2f6318ef9..9399fe6ca 100644 --- a/frontend/src/Search/SearchFooterConnector.js +++ b/frontend/src/Search/SearchFooterConnector.js @@ -28,11 +28,11 @@ function createMapStateToProps() { } if (params.indexerIds && !defaultIndexerIds.length) { - defaultSearchQueryParams.searchIndexerIds = params.indexerIds.split(',').filter(Boolean).map((id) => Number(id)); + defaultSearchQueryParams.searchIndexerIds = params.indexerIds.split(',').map((id) => Number(id)).filter(Boolean); } if (params.categories && !defaultCategories.length) { - defaultSearchQueryParams.searchCategories = params.categories.split(',').filter(Boolean).map((id) => Number(id)); + defaultSearchQueryParams.searchCategories = params.categories.split(',').map((id) => Number(id)).filter(Boolean); } if (params.type && defaultSearchType === 'search') {