ensure navigation to file page always has lbry:// prefix
This commit is contained in:
parent
9c74cd7f64
commit
0ad7a74905
1 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,14 @@ export function doNavigate(path, params = {}, options = {}) {
|
|||
return;
|
||||
}
|
||||
|
||||
// ensure uri always has "lbry://" prefix
|
||||
const navigationParams = params;
|
||||
if (path === '/show') {
|
||||
if (navigationParams.uri && !navigationParams.uri.startsWith('lbry://')) {
|
||||
navigationParams.uri = `lbry://${navigationParams.uri}`;
|
||||
}
|
||||
}
|
||||
|
||||
let url = path;
|
||||
if (params && Object.values(params).length) {
|
||||
url += `?${toQueryString(params)}`;
|
||||
|
|
Loading…
Reference in a new issue