Stop comparing for equality on update events and just emit for performance

This commit is contained in:
Amish Shah
2016-09-25 11:23:47 +01:00
parent c8636fd277
commit 0e8f1bef97
6 changed files with 21 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ class ChannelUpdateAction extends Action {
if (channel) {
const oldChannel = cloneObject(channel);
channel.setup(data);
if (!oldChannel.equals(data)) client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, channel);
client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, channel);
return {
old: oldChannel,
updated: channel,