mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix: don't patch set data with undefined (#6694)
This commit is contained in:
@@ -25,11 +25,13 @@ class GuildBan extends Base {
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
/**
|
||||
* The user this ban applies to
|
||||
* @type {User}
|
||||
*/
|
||||
this.user = this.client.users._add(data.user, true);
|
||||
if ('user' in data) {
|
||||
/**
|
||||
* The user this ban applies to
|
||||
* @type {User}
|
||||
*/
|
||||
this.user = this.client.users._add(data.user, true);
|
||||
}
|
||||
|
||||
if ('reason' in data) {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user