From bd3d1965341bd0bb5be4705425caefb2374b516d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 1 Jul 2014 11:11:00 +0200 Subject: [PATCH] Fixed notification count "0" being displayed during to type juggling --- wcfsetup/install/files/js/WCF.User.js | 2 ++ wcfsetup/install/files/js/WCF.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index 440210dd87..b5b13467a0 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -1372,6 +1372,8 @@ WCF.Notification.UserPanel = WCF.UserPanel.extend({ * @see WCF.UserPanel._updateBadge() */ _updateBadge: function(count) { + count = parseInt(count) || 0; + this._super(count); this._favico.badge(count); diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 2593ac09ad..1cfb4203a4 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -10164,6 +10164,8 @@ WCF.UserPanel = Class.extend({ * @param integer count */ _updateBadge: function(count) { + count = parseInt(count) || 0; + if (count) { var $badge = this._container.find('.badge'); if (!$badge.length) { -- 2.20.1