Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 4636bfb

Browse files
committed
fudgingly masking the issue where notif count is less than 0
1 parent 39d48e1 commit 4636bfb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

js/views/pageNavVw.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,14 @@ module.exports = baseVw.extend({
463463
},
464464

465465
getUnreadNotifCount: function() {
466-
return this.unreadNotifsViaSocket + this.notificationsCl.getUnreadCount() -
466+
var count;
467+
468+
count = this.unreadNotifsViaSocket + this.notificationsCl.getUnreadCount() -
467469
this.fetchNotifsMarkedAsRead || 0;
470+
471+
// fudge fix! sometimes the count is coming back as -1 and we can't reproduce it
472+
// nor track down why, so we're reluctantly fudging it.
473+
return count < 0 ? 0 : count;
468474
},
469475

470476
onNotifMenuOpen: function() {

0 commit comments

Comments
 (0)