Merge pull request #1177 from Stremio/fix/discover-deeplinks-crash
Some checks failed
Build / build (push) Has been cancelled

Fix crash when no extra option is selected in Discover
This commit is contained in:
Timothy Z. 2026-03-27 15:34:35 +02:00 committed by GitHub
commit 9dd44a7ef1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,13 +54,13 @@ const mapSelectableInputs = (discover, t) => {
value
})
})),
value: JSON.stringify({
value: selectedExtra ? JSON.stringify({
href: selectedExtra.deepLinks.discover,
value: selectedExtra.value,
}),
}) : undefined,
title: options.some(({ selected, value }) => selected && value === null) ?
() => t.string(name.toUpperCase())
: t.string(selectedExtra.value),
: selectedExtra ? t.string(selectedExtra.value) : () => t.string(name.toUpperCase()),
onSelect: (value) => {
const { href } = JSON.parse(value);
window.location = href;