Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy

This commit is contained in:
Nuckyz 2024-07-03 00:12:49 -03:00
commit c784bc5dbd
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -382,7 +382,6 @@ function patchFactory(id: PropertyKey, factory: AnyModuleFactory) {
for (let i = 0; i < patches.length; i++) { for (let i = 0; i < patches.length; i++) {
const patch = patches[i]; const patch = patches[i];
if (patch.predicate && !patch.predicate()) continue;
const moduleMatches = typeof patch.find === "string" const moduleMatches = typeof patch.find === "string"
? code.includes(patch.find) ? code.includes(patch.find)
@ -398,8 +397,6 @@ function patchFactory(id: PropertyKey, factory: AnyModuleFactory) {
// We change all patch.replacement to array in plugins/index // We change all patch.replacement to array in plugins/index
for (const replacement of patch.replacement as PatchReplacement[]) { for (const replacement of patch.replacement as PatchReplacement[]) {
if (replacement.predicate && !replacement.predicate()) continue;
const lastCode = code; const lastCode = code;
const lastFactory = factory; const lastFactory = factory;