From db1917983033f766b7b7480b0d515a5d6bc2c061 Mon Sep 17 00:00:00 2001 From: Maximilian Mader Date: Fri, 27 Feb 2015 00:23:26 +0100 Subject: [PATCH] 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. --- wcfsetup/install/files/js/WCF.User.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); - } + } }); /** -- 2.20.1