fix(GuildEmojiRoleStore): do not prematurely patch roles

Issue is the same as in #2312 and #2381, but for the GuildEmojiRoleStore.
Thanks to @KingDGrizzle for pointing this out.
This commit is contained in:
Pascal
2018-03-16 20:01:43 +01:00
parent acd1740f0b
commit d041cb2460
3 changed files with 24 additions and 10 deletions

View File

@@ -12,7 +12,7 @@ class GuildEmojisUpdateAction extends Action {
const cachedEmoji = guild.emojis.get(emoji.id);
if (cachedEmoji) {
deletions.delete(emoji.id);
if (!cachedEmoji.equals(emoji, true)) {
if (!cachedEmoji.equals(emoji)) {
// Emoji updated
this.client.actions.GuildEmojiUpdate.handle(cachedEmoji, emoji);
}