From 6bd4a34e6954dde9505578703f10e26510a1ff68 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 4 Dec 2013 16:28:18 -0500 Subject: [PATCH] fixed favicon sometimes updating with a string 0, should always be an int --- public/src/forum/footer.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/public/src/forum/footer.js b/public/src/forum/footer.js index dcbdf7b23c..8ce1831a54 100644 --- a/public/src/forum/footer.js +++ b/public/src/forum/footer.js @@ -149,16 +149,13 @@ notifIcon.toggleClass('active', false); } - // Update the saved local count - localStorage.setItem('notifications:count', count); - Tinycon.setBubble(localStorage.getItem('notifications:count')); - - // Update favicon + // Update the favicon + saved local count Tinycon.setBubble(count); + localStorage.setItem('notifications:count', count); }); if (localStorage.getItem('notifications:count') !== null) { - Tinycon.setBubble(localStorage.getItem('notifications:count')); + Tinycon.setBubble(parseInt(localStorage.getItem('notifications:count'), 10)); } socket.on('event:new_notification', function() {