fix router hook on stable

This commit is contained in:
AAGaming
2024-08-03 18:16:51 -04:00
parent d444248f62
commit b3a5f9659f
+5 -1
View File
@@ -62,8 +62,12 @@ class RouterHook extends Logger {
const reactRouterStackModule = findModuleByExport((e) => e == 'router-backstack', 20);
if (reactRouterStackModule) {
this.Route = Object.values(reactRouterStackModule).find(
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');