FakeNitro: Fix trimming wrong content

This commit is contained in:
Nuckyz 2024-03-06 07:11:14 -03:00
parent 4f0c0a12dc
commit 612fdf8952
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -585,13 +585,15 @@ export default definePlugin({
for (const [index, child] of children.entries()) children[index] = modifyChild(child);
children = this.clearEmptyArrayItems(children);
this.trimContent(children);
return children;
};
try {
return modifyChildren(lodash.cloneDeep(content));
const newContent = modifyChildren(lodash.cloneDeep(content));
this.trimContent(newContent);
return newContent;
} catch (err) {
new Logger("FakeNitro").error(err);
return content;