From 8115e3959e2aa0de5ee0b6f81eca426d19e63a75 Mon Sep 17 00:00:00 2001 From: GingerPlusPlus Date: Mon, 28 Jan 2019 12:25:17 +0100 Subject: [PATCH] Fix masterById --- utils/config.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils/config.js b/utils/config.js index b239e8f..e432b9c 100644 --- a/utils/config.js +++ b/utils/config.js @@ -11,9 +11,11 @@ if (!masterById && !masterByUsername) { config.master); } -const isMaster = masterByUsername - ? user => user && user.username && eq.username(user.username, config.master) - : user => user && user.id === Number(config.master); +const isMaster = masterById + ? user => + user && user.id === Number(config.master) + : user => + user && user.username && eq.username(user.username, config.master); module.exports = { isMaster,