diff --git a/src/pages/Search/SavedSearchRenamePage.tsx b/src/pages/Search/SavedSearchRenamePage.tsx index 98a33759682c..0d9399965757 100644 --- a/src/pages/Search/SavedSearchRenamePage.tsx +++ b/src/pages/Search/SavedSearchRenamePage.tsx @@ -28,7 +28,7 @@ function SavedSearchRenamePage({route}: {route: {params: {q: string; name: strin Navigation.navigate( ROUTES.SEARCH_CENTRAL_PANE.getRoute({ query: q, - name: newName, + name: newName?.trim(), }), ); }; @@ -38,7 +38,7 @@ function SavedSearchRenamePage({route}: {route: {params: {q: string; name: strin SearchActions.saveSearch({ queryJSON, - newName, + newName: newName?.trim() || q, }); applyFiltersAndNavigate();