feat(plugins): ConsoleJanitor (#2659)

This commit is contained in:
Nuckyz 2024-07-03 00:06:12 -03:00
parent 99b41dba19
commit 256a85c95c
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
4 changed files with 161 additions and 3 deletions

View file

@ -259,7 +259,6 @@ function patchFactories(factories: Record<string, (module: any, exports: any, re
for (let i = 0; i < patches.length; i++) {
const patch = patches[i];
if (patch.predicate && !patch.predicate()) continue;
const moduleMatches = typeof patch.find === "string"
? code.includes(patch.find)
@ -275,8 +274,6 @@ function patchFactories(factories: Record<string, (module: any, exports: any, re
// We change all patch.replacement to array in plugins/index
for (const replacement of patch.replacement as PatchReplacement[]) {
if (replacement.predicate && !replacement.predicate()) continue;
const lastMod = mod;
const lastCode = code;