Fixed: (UI) Prevent passing NaN values to search API when using invalid ids

pull/1777/head
Bogdan 1 year ago
parent 376202e2af
commit a5b5e7a3a5

@ -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') {

Loading…
Cancel
Save