Fix crash when searching screens and selecting layouts

This commit is contained in:
Andrew Kingston 2021-03-09 19:09:41 +00:00
parent 5195e42bc5
commit dd831d56d2
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@
$: filteredScreens = getFilteredScreens(allScreens, $screenSearchString) $: filteredScreens = getFilteredScreens(allScreens, $screenSearchString)
$: hasSearchMatch = $screenSearchString && filteredScreens.length > 0 $: hasSearchMatch = $screenSearchString && filteredScreens.length > 0
$: noSearchMatch = $screenSearchString && !filteredScreens.length $: noSearchMatch = $screenSearchString && !filteredScreens.length
$: routeSelected = route.subpaths[selectedScreen.routing.route] !== undefined $: routeSelected =
route.subpaths[selectedScreen?.routing?.route] !== undefined
$: routeOpened = routeManuallyOpened || routeSelected || hasSearchMatch $: routeOpened = routeManuallyOpened || routeSelected || hasSearchMatch
const changeScreen = screenId => { const changeScreen = screenId => {