summaryrefslogtreecommitdiff
path: root/frontend/src/router-hook.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/router-hook.tsx')
-rw-r--r--frontend/src/router-hook.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/router-hook.tsx b/frontend/src/router-hook.tsx
index 9b5f65dc..a7b6ec92 100644
--- a/frontend/src/router-hook.tsx
+++ b/frontend/src/router-hook.tsx
@@ -56,11 +56,11 @@ class RouterHook extends Logger {
window.__ROUTER_HOOK_INSTANCE?.deinit?.();
window.__ROUTER_HOOK_INSTANCE = this;
- const reactRouterStackModule = findModuleByExport((e) => e == 'router-backstack', 20);
+ const reactRouterStackModule = findModuleByExport((e) => typeof e == 'string' && e == 'router-backstack', 20);
if (reactRouterStackModule) {
this.Route =
Object.values(reactRouterStackModule).find(
- (e) => typeof e == 'function' && /routePath:.\.match\?\.path./.test(e.toString()),
+ (e) => typeof e == 'function' && /routePath:[\w$]+\.match\?\.path./.test(e.toString()),
) ||
Object.values(reactRouterStackModule).find(
(e) => typeof e == 'function' && /routePath:null===\(.=.\.match\)/.test(e.toString()),