From 4d8e4e62ca2783bea7963ce3267ebd1ab0d94bfb Mon Sep 17 00:00:00 2001 From: megumin Date: Wed, 25 Oct 2023 14:41:57 +0100 Subject: [PATCH] fix: notrack failing patches (#1857) --- src/plugins/_core/noTrack.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/_core/noTrack.ts b/src/plugins/_core/noTrack.ts index ca112659..424e62c0 100644 --- a/src/plugins/_core/noTrack.ts +++ b/src/plugins/_core/noTrack.ts @@ -47,16 +47,17 @@ export default definePlugin({ replace: "this._intervalId=undefined&&" }, { - match: /(?<=increment=function\(\i\){)/, - replace: "return;" + match: /(increment\(\i\){)/, + replace: "$1return;" } ] }, { find: ".installedLogHooks)", replacement: { - match: /if\(\i\.getDebugLogging\(\)&&!\i\.installedLogHooks\)/, - replace: "if(false)" + // if getDebugLogging() returns false, the hooks don't get installed. + match: "getDebugLogging(){", + replace: "getDebugLogging(){return false;" } }, ]