fix(Guild): passing the constructor partial data from an invite no longer errors (#1868)

This commit is contained in:
SpaceEEC
2017-09-01 16:05:02 +02:00
committed by Crawl
parent b8a37b6f0c
commit 1bdaa62481

View File

@@ -216,7 +216,7 @@ class Guild extends Base {
* @type {EmojiStore<Snowflake, Emoji>}
*/
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,