diff --git a/src/sceneRoute.tsx b/src/sceneRoute.tsx index 9404c9b..03f9bd3 100644 --- a/src/sceneRoute.tsx +++ b/src/sceneRoute.tsx @@ -114,9 +114,9 @@ const Routes = (props: { routeCategories: RouteCategories; header: string }) => )[0] useEffect(() => { - if (selectedRoute.spawnAvatar) SearchParamState.set('spectate', '') + if (selectedRoute?.spawnAvatar) SearchParamState.set('spectate', '') else SearchParamState.set('spectate', none) - }, [selectedRoute.spawnAvatar]) + }, [selectedRoute?.spawnAvatar]) const Entry = selectedRoute && selectedRoute.entry