mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 01:35:11 +00:00
Fix Question Mark appearing on address
This commit is contained in:
parent
d4bab45809
commit
4dfcb4645a
1 changed files with 4 additions and 2 deletions
|
@ -91,11 +91,13 @@ function ShowPage(props: Props) {
|
||||||
const hostname = isDev ? 'localhost' : DOMAIN;
|
const hostname = isDev ? 'localhost' : DOMAIN;
|
||||||
if (canonicalUrlPath !== window.location.pathname && hostname === window.location.hostname) {
|
if (canonicalUrlPath !== window.location.pathname && hostname === window.location.hostname) {
|
||||||
const urlParams = new URLSearchParams(search);
|
const urlParams = new URLSearchParams(search);
|
||||||
|
let replaceUrl = canonicalUrlPath;
|
||||||
if (urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID)) {
|
if (urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID)) {
|
||||||
const listId = urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID) || '';
|
const listId = urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID) || '';
|
||||||
urlParams.set(COLLECTIONS_CONSTS.COLLECTION_ID, listId);
|
urlParams.set(COLLECTIONS_CONSTS.COLLECTION_ID, listId);
|
||||||
|
replaceUrl += `?${urlParams.toString()}`;
|
||||||
}
|
}
|
||||||
history.replaceState(history.state, '', `${canonicalUrlPath}?${urlParams.toString()}`);
|
history.replaceState(history.state, '', replaceUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// @endif
|
// @endif
|
||||||
|
@ -106,7 +108,7 @@ function ShowPage(props: Props) {
|
||||||
) {
|
) {
|
||||||
resolveUri(uri);
|
resolveUri(uri);
|
||||||
}
|
}
|
||||||
}, [resolveUri, isResolvingUri, canonicalUrl, uri, claimExists, haventFetchedYet, history, isMine, claimIsPending]);
|
}, [resolveUri, isResolvingUri, canonicalUrl, uri, claimExists, haventFetchedYet, isMine, claimIsPending, search]);
|
||||||
|
|
||||||
// Don't navigate directly to repost urls
|
// Don't navigate directly to repost urls
|
||||||
// Always redirect to the actual content
|
// Always redirect to the actual content
|
||||||
|
|
Loading…
Add table
Reference in a new issue