Skip to content

Commit

Permalink
fix(Actions): Avoid crash in InviteCreate with unknown channel (#4882)
Browse files Browse the repository at this point in the history
  • Loading branch information
wasdennnoch committed Oct 17, 2020
1 parent 937153a commit dd12912
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/actions/InviteCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class InviteCreateAction extends Action {
const client = this.client;
const channel = client.channels.cache.get(data.channel_id);
const guild = client.guilds.cache.get(data.guild_id);
if (!channel && !guild) return false;
if (!channel) return false;

const inviteData = Object.assign(data, { channel, guild });
const invite = new Invite(client, inviteData);
Expand Down

0 comments on commit dd12912

Please sign in to comment.