From: Maximilian Mader Date: Thu, 26 Feb 2015 23:23:26 +0000 (+0100) Subject: Set this._badge to null in WCF.User.Panel.Abstract.updateBadge on removal X-Git-Tag: 2.1.0~15^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=db1917983033f766b7b7480b0d515a5d6bc2c061;p=GitHub%2FWoltLab%2FWCF.git Set this._badge to null in WCF.User.Panel.Abstract.updateBadge on removal When not explicitly set to `null` the variable will still contain a reference, thus a badge update will not create a new badge when it was removed earlier. --- diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index 211bd47e9e..58d1dfcf67 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -390,6 +390,7 @@ WCF.User.Panel.Abstract = Class.extend({ } else if (this._badge !== null) { this._badge.remove(); + this._badge = null; } if (this._options.enableMarkAsRead) { @@ -527,7 +528,7 @@ WCF.User.Panel.Notification = WCF.User.Panel.Abstract.extend({ } this.updateBadge(count); - } + } }); /**