aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-05-12 23:34:12 +0200
committerV <vendicated@riseup.net>2023-05-12 23:34:30 +0200
commit2fdc00b11e21175bc4afa6d9547e9c1a5a2b4b25 (patch)
treeedc787cb67fc9dd67fb4bbac00ac95d77e6676ef
parent3da112680d443d6d0ce83155940f2c624f437105 (diff)
downloadVencord-2fdc00b11e21175bc4afa6d9547e9c1a5a2b4b25.tar.gz
Vencord-2fdc00b11e21175bc4afa6d9547e9c1a5a2b4b25.tar.bz2
Vencord-2fdc00b11e21175bc4afa6d9547e9c1a5a2b4b25.zip
BadgesAPI: Fix canary crash (new pomelo badge, the horror)
-rw-r--r--src/plugins/apiBadges.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/apiBadges.tsx b/src/plugins/apiBadges.tsx
index d9e97b2..23ed6de 100644
--- a/src/plugins/apiBadges.tsx
+++ b/src/plugins/apiBadges.tsx
@@ -82,8 +82,8 @@ export default definePlugin({
find: "Messages.PROFILE_USER_BADGES,role:",
replacement: [
{
- match: /null==\i\?void 0:(\i)\.getBadges\(\)/,
- replace: (_, badgesMod) => `Vencord.Api.Badges._getBadges(arguments[0]).concat(${badgesMod}?.getBadges()??[])`,
+ match: /(?<=(\i)\.isTryItOutFlow,)(.{0,300})null==\i\?void 0:(\i)\.getBadges\(\)/,
+ replace: (_, props, restCode, badgesMod) => `vencordProps=${props},${restCode}Vencord.Api.Badges._getBadges(vencordProps).concat(${badgesMod}?.getBadges()??[])`,
},
{
// alt: "", aria-hidden: false, src: originalSrc