From 1bdaa6248193915b4333ea4cc6ac2b901117f1f6 Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Fri, 1 Sep 2017 16:05:02 +0200 Subject: [PATCH] fix(Guild): passing the constructor partial data from an invite no longer errors (#1868) --- src/structures/Guild.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 4d3e5f45f..da3e73f2c 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -216,7 +216,7 @@ class Guild extends Base { * @type {EmojiStore} */ this.emojis = new EmojiStore(this); - for (const emoji of data.emojis) this.emojis.create(emoji); + if (data.emojis) for (const emoji of data.emojis) this.emojis.create(emoji); } else { this.client.actions.GuildEmojisUpdate.handle({ guild_id: this.id,