From: Alexander Ebert Date: Tue, 1 Jul 2014 09:11:00 +0000 (+0200) Subject: Fixed notification count "0" being displayed during to type juggling X-Git-Tag: 2.1.0_Alpha_1~641^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bd3d1965341bd0bb5be4705425caefb2374b516d;p=GitHub%2FWoltLab%2FWCF.git Fixed notification count "0" being displayed during to type juggling --- 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) {