BadgesAPI: Don't depend on getBadges module not being undefined (#942)
This commit is contained in:
parent
c0ac6a4b86
commit
e70d00d008
1 changed files with 2 additions and 2 deletions
|
@ -61,8 +61,8 @@ export default definePlugin({
|
||||||
find: "Messages.PROFILE_USER_BADGES,role:",
|
find: "Messages.PROFILE_USER_BADGES,role:",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /(?<=void 0:)\i.getBadges\(\)/,
|
match: /null==\i\?void 0:(\i)\.getBadges\(\)/,
|
||||||
replace: "Vencord.Api.Badges._getBadges(arguments[0]).concat($&??[])",
|
replace: (_, badgesMod) => `Vencord.Api.Badges._getBadges(arguments[0]).concat(${badgesMod}?.getBadges()??[])`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// alt: "", aria-hidden: false, src: originalSrc
|
// alt: "", aria-hidden: false, src: originalSrc
|
||||||
|
|
Loading…
Reference in a new issue