From 3ea5ea9f00ec5dba37f86ef40308e1a5fdccd915 Mon Sep 17 00:00:00 2001 From: Gabriel Duarte Date: Fri, 25 Sep 2020 04:02:22 +0200 Subject: [PATCH] fix the wrong profile order priority on highlight settings closes #908 --- src/modules/chat/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/chat/index.js b/src/modules/chat/index.js index b60849a6..cc34c7ed 100644 --- a/src/modules/chat/index.js +++ b/src/modules/chat/index.js @@ -480,14 +480,14 @@ export default class Chat extends Module { if ( ! val || ! val.length ) return null; + const colorWithHighestPriority = val[0] + const colors = new Map; - for(const item of val) { - const c = item.c || null, - v = item.v; + const c = colorWithHighestPriority.c || null, + v = colorWithHighestPriority.v; - colors.set(v, c); - } + colors.set(v, c); return colors; }