summaryrefslogtreecommitdiff
path: root/frontend/src
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src')
-rw-r--r--frontend/src/errorboundary-hook.tsx2
-rw-r--r--frontend/src/router-hook.tsx4
-rw-r--r--frontend/src/tabs-hook.tsx1
3 files changed, 3 insertions, 4 deletions
diff --git a/frontend/src/errorboundary-hook.tsx b/frontend/src/errorboundary-hook.tsx
index 70aa2188..9dbe9dcd 100644
--- a/frontend/src/errorboundary-hook.tsx
+++ b/frontend/src/errorboundary-hook.tsx
@@ -24,7 +24,7 @@ class ErrorBoundaryHook extends Logger {
window.__ERRORBOUNDARY_HOOK_INSTANCE = this;
// valve writes only the sanest of code
- const exp = /^\(\)=>\(.\|\|(?:.\(|\(.=)new .\),.\)$/;
+ const exp = /^\(\)=>\([\w$]+\|\|(?:[\w$]+\(|\([\w$]+=)new [\w$]+\),[\w$]+\)$/;
const initErrorReportingStore = findModuleExport(
(e) => typeof e == 'function' && e?.toString && exp.test(e.toString()),
);
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()),
diff --git a/frontend/src/tabs-hook.tsx b/frontend/src/tabs-hook.tsx
index 5d9518fd..ecb60f30 100644
--- a/frontend/src/tabs-hook.tsx
+++ b/frontend/src/tabs-hook.tsx
@@ -73,7 +73,6 @@ class TabsHook extends Logger {
(qamEmbeddedRenderer != null && n.elementType == qamEmbeddedRenderer),
); // need elementType, because type is actually mobx wrapper
if (qamNode) {
- console.log('patching existing qam');
// Only affects this fiber node so we don't need to unpatch here
qamNode.type = qamNode.elementType.type;
if (qamNode?.alternate) {