From: Alexander Ebert Date: Mon, 4 Apr 2016 10:54:21 +0000 (+0200) Subject: Fixed outside calls throwing an error for interactive dropdowns X-Git-Tag: 2.1.11~44 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7eec07ea5d5c5de2e9dadd7e95d425ede4cf2c9a;p=GitHub%2FWoltLab%2FWCF.git Fixed outside calls throwing an error for interactive dropdowns --- 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(); + } } });