From 7eec07ea5d5c5de2e9dadd7e95d425ede4cf2c9a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 4 Apr 2016 12:54:21 +0200 Subject: [PATCH] Fixed outside calls throwing an error for interactive dropdowns --- wcfsetup/install/files/js/WCF.User.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index aa1d4ef296..6e7584d2c5 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -405,7 +405,11 @@ WCF.User.Panel.Abstract = Class.extend({ * Resets the dropdown's inner item list. */ resetItems: function() { - this._dropdown.resetItems(); + // this method could be called from outside, but the dropdown was never + // toggled and thus never initialized + if (this._dropdown !== null) { + this._dropdown.resetItems(); + } } }); -- 2.20.1