mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-26 04:23:00 +00:00
Merge pull request #948 from Stremio/fix/discover-catalog-select
Discover: fix invalid catalog crash
This commit is contained in:
commit
125a2650f8
1 changed files with 3 additions and 4 deletions
|
|
@ -21,7 +21,6 @@ const mapSelectableInputs = (discover, t) => {
|
||||||
window.location = value;
|
window.location = value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const selectedCatalog = discover.selectable.catalogs.find(({ selected }) => selected);
|
|
||||||
const catalogSelect = {
|
const catalogSelect = {
|
||||||
options: discover.selectable.catalogs
|
options: discover.selectable.catalogs
|
||||||
.map(({ id, name, addon, deepLinks }) => ({
|
.map(({ id, name, addon, deepLinks }) => ({
|
||||||
|
|
@ -29,9 +28,9 @@ const mapSelectableInputs = (discover, t) => {
|
||||||
label: t.catalogTitle({ addon, id, name }),
|
label: t.catalogTitle({ addon, id, name }),
|
||||||
title: `${name} (${addon.manifest.name})`
|
title: `${name} (${addon.manifest.name})`
|
||||||
})),
|
})),
|
||||||
value: discover.selected?.request.path.id
|
value: discover.selectable.catalogs
|
||||||
? selectedCatalog.deepLinks.discover
|
.filter(({ selected }) => selected)
|
||||||
: undefined,
|
.map(({ deepLinks }) => deepLinks.discover),
|
||||||
title: discover.selected !== null
|
title: discover.selected !== null
|
||||||
? () => {
|
? () => {
|
||||||
const selectableCatalog = discover.selectable.catalogs
|
const selectableCatalog = discover.selectable.catalogs
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue