From 9eb9bfe8588848d7edda7e49d34b92aa8578a581 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Mon, 8 Apr 2024 18:08:38 -0400 Subject: [PATCH] refactor: don't ignore empty string as a case for searching --- .../tabs-section/courses-tab/courses-filters/index.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/studio-home/tabs-section/courses-tab/courses-filters/index.jsx b/src/studio-home/tabs-section/courses-tab/courses-filters/index.jsx index a1939681b8..f80a597367 100644 --- a/src/studio-home/tabs-section/courses-tab/courses-filters/index.jsx +++ b/src/studio-home/tabs-section/courses-tab/courses-filters/index.jsx @@ -90,16 +90,15 @@ const CoursesFilters = ({ const handleSearchCourses = (searchValueDebounced) => { const valueFormatted = searchValueDebounced.trim(); - const searchValueRequest = valueFormatted.length > 0 ? valueFormatted : undefined; const filterParams = { - search: searchValueRequest, + search: valueFormatted, activeOnly, archivedOnly, order, }; const hasOnlySpaces = regexOnlyWhiteSpaces.test(searchValueDebounced); - if (searchValueRequest && valueFormatted !== search && !hasOnlySpaces && !cleanFilters) { + if (valueFormatted !== search && !hasOnlySpaces && !cleanFilters) { dispatch(updateStudioHomeCoursesCustomParams({ currentPage: 1, isFiltered: true,