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,