Fixed notification count "0" being displayed during to type juggling
authorAlexander Ebert <ebert@woltlab.com>
Tue, 1 Jul 2014 09:11:00 +0000 (11:11 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 1 Jul 2014 09:11:00 +0000 (11:11 +0200)
wcfsetup/install/files/js/WCF.User.js
wcfsetup/install/files/js/WCF.js

index 440210dd87cb580f787fe4279c30738e3258b443..b5b13467a04ccbcc95c9e9eb00b1bf63935a9bc2 100644 (file)
@@ -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);
index 2593ac09adc96390100bcfccbaafda3f2e133157..1cfb4203a430cd1afe818015c0dd3202cabdb6e6 100755 (executable)
@@ -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) {