Properly ErrorBoundary recent changes

This commit is contained in:
Nuckyz 2024-05-13 22:45:57 -03:00
parent 892167420a
commit 9dc8e4e244
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 41 additions and 42 deletions

View file

@ -61,7 +61,7 @@ export default definePlugin({
find: ".popularApplicationCommandIds,",
replacement: {
match: /lastSection:(!?\i)}\),/,
replace: "$&$self.patchPadding($1),"
replace: "$&$self.patchPadding({lastSection:$1}),"
}
}
],
@ -81,12 +81,10 @@ export default definePlugin({
}
},
patchPadding(lastSection: any) {
if (!lastSection) return;
patchPadding: ErrorBoundary.wrap(({ lastSection }) => {
if (!lastSection) return null;
return (
<ErrorBoundary noop>
<div className={UserPopoutSectionCssClasses.lastSection}></div>
</ErrorBoundary>
<div className={UserPopoutSectionCssClasses.lastSection} ></div>
);
}
})
});