From d02c0bd72cf91cf64ffdfadbc0ade705f9fbb572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Mon, 14 Mar 2016 01:44:03 -0400 Subject: [PATCH] Remove unnecessary operation when sorting users --- src/models/chan.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/models/chan.js b/src/models/chan.js index b493341b..fb39128f 100644 --- a/src/models/chan.js +++ b/src/models/chan.js @@ -27,14 +27,8 @@ Chan.prototype.sortUsers = function() { this.users, function(u) { return u.name.toLowerCase(); } ); - var modes = [ - "~", - "&", - "@", - "%", - "+", - ].reverse(); - modes.forEach(function(mode) { + + ["+", "%", "@", "&", "~"].forEach(function(mode) { this.users = _.remove( this.users, function(u) { return u.mode === mode; }