fix sorting things (#1922)

* fix sorting things

* Update Guild.js
This commit is contained in:
Gus Caplan
2017-09-09 16:43:02 -05:00
committed by Crawl
parent f4c2d6dfa2
commit c523e224d7

View File

@@ -1132,10 +1132,9 @@ class Guild extends Base {
} }
_sortedChannels(channel) { _sortedChannels(channel) {
if (channel.type === Constants.ChannelTypes.CATEGORY) { const category = channel.type === Constants.ChannelTypes.CATEGORY;
return Util.discordSort(this.channels.filter(c => c.type === Constants.ChannelTypes.CATEGORY)); return Util.discordSort(this.channels.filter(c =>
} c.type === channel.type && (category || c.parent === channel.parent)));
return Util.discordSort(this.channels.filter(c => c.parent === channel.parent));
} }
} }