fix: transform patches find
to array
The latest dev build of Vencord expects it to be an array
This commit is contained in:
parent
8c6941b8e9
commit
cddb040adc
1 changed files with 1 additions and 0 deletions
|
@ -17,6 +17,7 @@ export function addPatch<P extends PatchData>(p: P) {
|
|||
const { patches, ...globals } = p;
|
||||
|
||||
for (const patch of patches as Patch[]) {
|
||||
if (!Array.isArray(patch.find)) patch.find = [patch.find];
|
||||
if (!Array.isArray(patch.replacement)) patch.replacement = [patch.replacement];
|
||||
for (const r of patch.replacement) {
|
||||
if (typeof r.replace === "string") r.replace = r.replace.replaceAll("$self", "VCDP");
|
||||
|
|
Reference in a new issue