Simplify some components finds; Make undo of patch groups more clear

This commit is contained in:
Nuckyz 2023-11-24 23:14:18 -03:00
parent 6573c4757c
commit 1b179f3c6d
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
3 changed files with 6 additions and 14 deletions

View file

@ -212,7 +212,7 @@ function patchFactories(factories: Record<string | number, (module: { exports: a
}
if (patch.group) {
logger.warn(`Undoing patch ${patch.find} by ${patch.plugin} because replacement ${replacement.match} had no effect`);
logger.warn(`Undoing patch group ${patch.find} by ${patch.plugin} because replacement ${replacement.match} had no effect`);
code = previousCode;
mod = previousMod;
patchedBy.delete(patch.plugin);
@ -260,7 +260,7 @@ function patchFactories(factories: Record<string | number, (module: { exports: a
patchedBy.delete(patch.plugin);
if (patch.group) {
logger.warn(`Undoing patch ${patch.find} by ${patch.plugin} because replacement ${replacement.match} errored`);
logger.warn(`Undoing patch group ${patch.find} by ${patch.plugin} because replacement ${replacement.match} errored`);
code = previousCode;
mod = previousMod;
break;