fix badges with custom component

This commit is contained in:
Vendicated 2024-05-03 22:18:31 +02:00
parent 78183eb226
commit 520e915168
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -78,7 +78,7 @@ export default definePlugin({
}, },
// replace their component with ours if applicable // replace their component with ours if applicable
{ {
match: /(?<=text:(\i)\.description,spacing:12,)children:/, match: /(?<=text:(\i)\.description,spacing:12,.{0,50})children:/,
replace: "children:$1.component ? () => $self.renderBadgeComponent($1) :" replace: "children:$1.component ? () => $self.renderBadgeComponent($1) :"
}, },
// conditionally override their onClick with badge.onClick if it exists // conditionally override their onClick with badge.onClick if it exists