From e0d423027279cf212c53d5e13bbee27862d6983c Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Fri, 28 Feb 2020 14:32:04 -0300 Subject: [PATCH] [FIX] Setting not present (#1775) Co-authored-by: Diego Mello --- app/lib/rocketchat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index 5406eed67..1858b4510 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -627,7 +627,7 @@ const RocketChat = { getSlashCommands, getRoles, parseSettings: settings => settings.reduce((ret, item) => { - ret[item._id] = item[defaultSettings[item._id].type]; + ret[item._id] = defaultSettings[item._id] && item[defaultSettings[item._id].type]; if (item._id === 'Hide_System_Messages') { ret[item._id] = ret[item._id] .reduce((array, value) => [...array, ...value === 'mute_unmute' ? ['user-muted', 'user-unmuted'] : [value]], []);