Skip to content

Commit

Permalink
fix: handle possibly missing property (#7641)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Mar 24, 2022
1 parent d5369a5 commit 0c32332
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/discord.js/src/structures/AnonymousGuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class AnonymousGuild extends BaseGuild {
* @type {?number}
*/
this.premiumSubscriptionCount = data.premium_subscription_count;
} else {
this.premiumSubscriptionCount ??= null;
}
}

Expand Down

0 comments on commit 0c32332

Please sign in to comment.