From 16a4445a3f854c6eac07a16c31545d0f055f3066 Mon Sep 17 00:00:00 2001 From: Kata Date: Sun, 2 Feb 2020 14:22:02 -0500 Subject: [PATCH] fix(Presentation): flip sort direction of memberRoles for color --- Server/services/presentation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/services/presentation.js b/Server/services/presentation.js index 9e8b51c..7a49324 100644 --- a/Server/services/presentation.js +++ b/Server/services/presentation.js @@ -44,7 +44,7 @@ class PresentationService extends Service { const serverRoles = await this.discord.getRoles(server.id) const memberRoles = member.rolesList .map(id => serverRoles.find(role => role.id === id)) - .sort((a, b) => (a.position < b.position ? -1 : 1)) + .sort((a, b) => (a.position > b.position ? -1 : 1)) const color = memberRoles.length > 0 ? memberRoles[0].color : 0