From e0cfb7fb36132abe4367d5ced1650e13a19dbb66 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Apr 2019 13:39:23 +0100 Subject: [PATCH] fix: not checking for guild when creating a channel --- src/stores/ChannelStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/ChannelStore.js b/src/stores/ChannelStore.js index e745eea33..64c482cb3 100644 --- a/src/stores/ChannelStore.js +++ b/src/stores/ChannelStore.js @@ -55,7 +55,7 @@ class ChannelStore extends DataStore { add(data, guild, cache = true) { const existing = this.get(data.id); if (existing && existing._patch && cache) existing._patch(data); - if (existing) { + if (existing && guild) { guild.channels.add(existing); return existing; }