Fix: Canonicalize regex finds

This commit is contained in:
Nuckyz 2024-05-15 00:38:07 -03:00
parent f74da73086
commit 54f58cd7c9
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
3 changed files with 16 additions and 3 deletions

View file

@ -303,8 +303,10 @@ async function runtime(token: string) {
delete patch.predicate;
delete patch.group;
if (!Array.isArray(patch.replacement))
Vencord.Util.canonicalizeFind(patch);
if (!Array.isArray(patch.replacement)) {
patch.replacement = [patch.replacement];
}
patch.replacement.forEach(r => {
delete r.predicate;