mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 04:31:46 +02:00
fix: crash when opening a random unregistered route
This commit is contained in:
@@ -10,6 +10,7 @@ const cache = {};
|
||||
function CachedRouter() {
|
||||
const RouteResult = useRoutes(routes, { fallbackRoute: "/" });
|
||||
useEffect(() => {
|
||||
if (!RouteResult) return;
|
||||
NavigationEvents.publish("onNavigate", RouteResult);
|
||||
|
||||
const key = RouteResult.key || "general";
|
||||
|
||||
Reference in New Issue
Block a user