From 85756c78b475c9af29d8a36e4c4d5804b8e17798 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 25 May 2017 17:17:37 +0100 Subject: [PATCH] Change to object literal --- src/Roles.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Roles.js b/src/Roles.js index cdfc156423..8c1f711bbe 100644 --- a/src/Roles.js +++ b/src/Roles.js @@ -16,12 +16,12 @@ limitations under the License. import { _t } from './languageHandler'; export function levelRoleMap() { - const LEVEL_ROLE_MAP = {}; - LEVEL_ROLE_MAP[undefined] = _t('Default'); - LEVEL_ROLE_MAP[0] = _t('User'); - LEVEL_ROLE_MAP[50] = _t('Moderator'); - LEVEL_ROLE_MAP[100] = _t('Admin'); - return LEVEL_ROLE_MAP; + return { + undefined: _t('Default'), + 0: _t('User'), + 50: _t('Moderator'), + 100: _t('Admin'), + }; } export function textualPowerLevel(level, userDefault) {