From b3a5f9659f5744327103e28d1f9f53f393f23b6d Mon Sep 17 00:00:00 2001
From: AAGaming <aagaming@riseup.net>
Date: Sat, 3 Aug 2024 18:16:51 -0400
Subject: fix router hook on stable

---
 frontend/src/router-hook.tsx | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'frontend/src/router-hook.tsx')

diff --git a/frontend/src/router-hook.tsx b/frontend/src/router-hook.tsx
index cc00643a..8cffb738 100644
--- a/frontend/src/router-hook.tsx
+++ b/frontend/src/router-hook.tsx
@@ -62,9 +62,13 @@ class RouterHook extends Logger {
 
     const reactRouterStackModule = findModuleByExport((e) => e == 'router-backstack', 20);
     if (reactRouterStackModule) {
-      this.Route = Object.values(reactRouterStackModule).find(
-        (e) => typeof e == 'function' && /routePath:.\.match\?\.path./.test(e.toString()),
-      );
+      this.Route =
+        Object.values(reactRouterStackModule).find(
+          (e) => typeof e == 'function' && /routePath:.\.match\?\.path./.test(e.toString()),
+        ) ||
+        Object.values(reactRouterStackModule).find(
+          (e) => typeof e == 'function' && /routePath:null===\(.=.\.match\)/.test(e.toString()),
+        );
       if (!this.Route) {
         this.error('Failed to find Route component');
       }
-- 
cgit v1.2.3

