Skip to content

Commit

Permalink
[FIX] Saving user preferences (#12170)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego authored Sep 26, 2018
1 parent 9c0e687 commit 8ce80c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rocketchat-lib/server/models/Users.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ class ModelUsers extends RocketChat.models._Base {
const update = {
$set: settings,
};
if (![1, 2].includes(parseInt(settings.preferences.clockMode))) {
if (parseInt(preferences.clockMode) === 0) {
delete update.$set['settings.preferences.clockMode'];
update.$unset = { 'settings.preferences.clockMode': 1 };
}
Expand Down

0 comments on commit 8ce80c2

Please sign in to comment.