aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuckyz <61953774+Nuckyz@users.noreply.github.com>2023-04-18 02:25:14 -0300
committerGitHub <noreply@github.com>2023-04-18 05:25:14 +0000
commite70d00d008cd34875fbbc6e302dd4de16fdf9637 (patch)
tree738ac9a47df18fdabd8b83039e6a4859af19f61b
parentc0ac6a4b8696c3506e7b900cbac11b6b984495d8 (diff)
downloadVencord-e70d00d008cd34875fbbc6e302dd4de16fdf9637.tar.gz
Vencord-e70d00d008cd34875fbbc6e302dd4de16fdf9637.tar.bz2
Vencord-e70d00d008cd34875fbbc6e302dd4de16fdf9637.zip
BadgesAPI: Don't depend on getBadges module not being undefined (#942)
-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 7847340..57c5b38 100644
--- a/src/plugins/apiBadges.tsx
+++ b/src/plugins/apiBadges.tsx
@@ -61,8 +61,8 @@ export default definePlugin({
find: "Messages.PROFILE_USER_BADGES,role:",
replacement: [
{
- match: /(?<=void 0:)\i.getBadges\(\)/,
- replace: "Vencord.Api.Badges._getBadges(arguments[0]).concat($&??[])",
+ match: /null==\i\?void 0:(\i)\.getBadges\(\)/,
+ replace: (_, badgesMod) => `Vencord.Api.Badges._getBadges(arguments[0]).concat(${badgesMod}?.getBadges()??[])`,
},
{
// alt: "", aria-hidden: false, src: originalSrc