1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00

add optional chain back in

This commit is contained in:
Martin McKeaveney 2020-11-19 17:09:56 +00:00
parent 169cbe4a42
commit ee8dc0282a

View file

@ -43,7 +43,7 @@ export const screenRouter = ({ screens, onScreenSelected, window }) => {
return sanitize(url)
}
const routes = screens.map(screen => makeRootedPath(screen.routing.route))
const routes = screens.map(screen => makeRootedPath(screen?.routing.route))
let fallback = routes.findIndex(([p]) => p === makeRootedPath("*"))
if (fallback < 0) fallback = 0