summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/errorboundary-hook.tsx2
-rw-r--r--frontend/src/router-hook.tsx2
2 files changed, 2 insertions, 2 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..56a0add9 100644
--- a/frontend/src/router-hook.tsx
+++ b/frontend/src/router-hook.tsx
@@ -60,7 +60,7 @@ class RouterHook extends Logger {
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()),