Search: Get uris
with same query as doSearch
## Issue
2731: Searches with forward slashes returns no results
## Change
The slash-removal came from (0db20834f9
).
Removing the 2 `replace(/\//, ' ')` from lbry-desktop fixes it, but this PR assumes the slash-removal is intentional to cover something else. So, we'll make the Search side do the same thing to match what's happening in `doSearch`.
A little bit ugly, but there's already a comment about this in `makeSelectSearchUris`, so it'll probably get cleaned up in the future.
This commit is contained in:
parent
d78d965183
commit
64874c773b
1 changed files with 5 additions and 1 deletions
|
@ -16,7 +16,11 @@ import SearchPage from './view';
|
|||
const select = (state, props) => {
|
||||
const showMature = makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state);
|
||||
const urlParams = new URLSearchParams(props.location.search);
|
||||
const urlQuery = urlParams.get('q') || null;
|
||||
let urlQuery = urlParams.get('q') || null;
|
||||
if (urlQuery) {
|
||||
urlQuery = urlQuery.replace(/^lbry:\/\//i, '').replace(/\//, ' ');
|
||||
}
|
||||
|
||||
const query = makeSelectQueryWithOptions(
|
||||
urlQuery,
|
||||
showMature === false ? { nsfw: false, isBackgroundSearch: false } : { isBackgroundSearch: false }
|
||||
|
|
Loading…
Reference in a new issue