mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 19:02:15 +00:00
fix(App): check if transportUrl is valid before opening it
This commit is contained in:
parent
53ffa321d8
commit
eb3fad32f1
1 changed files with 3 additions and 1 deletions
|
|
@ -109,7 +109,9 @@ const App = () => {
|
|||
const onOpenMedia = (data) => {
|
||||
if (data.startsWith('stremio://')) {
|
||||
const transportUrl = data.replace('stremio://', 'https://');
|
||||
window.location.href = `#/addons?addon=${encodeURIComponent(transportUrl)}`;
|
||||
if (URL.canParse(transportUrl)) {
|
||||
window.location.href = `#/addons?addon=${encodeURIComponent(transportUrl)}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue