From c89b37acd5c0b9fcdd226b821af84ac6ae359fd6 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Sat, 5 Sep 2015 15:30:38 +0500 Subject: [PATCH] fix wrong condition statements --- js/twister_directmsg.js | 2 +- js/twister_newmsgs.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/twister_directmsg.js b/js/twister_directmsg.js index 7aeb5ec..20587ec 100644 --- a/js/twister_directmsg.js +++ b/js/twister_directmsg.js @@ -156,7 +156,7 @@ function directMessagesPopup() { .attr('title', polyglot.t('Mark all as read')) .on('click', function() { for (var user in _newDMsPerUser) { - if (!user[0] === '*') + if (user[0] !== '*') _newDMsPerUser[user] = 0; } saveDMsToStorage(); diff --git a/js/twister_newmsgs.js b/js/twister_newmsgs.js index 38214c9..df1b738 100644 --- a/js/twister_newmsgs.js +++ b/js/twister_newmsgs.js @@ -225,7 +225,7 @@ function getNewDMsCount() { var newDMs = 0; for (var user in _newDMsPerUser) { - if (!user[0] === '*' && _newDMsPerUser[user]) + if (user[0] !== '*' && _newDMsPerUser[user]) newDMs += _newDMsPerUser[user]; }