From: Alexander Ebert Date: Thu, 14 Nov 2019 13:38:18 +0000 (+0100) Subject: Uninitialized variable and comma expression X-Git-Tag: 5.2.0_Beta_3~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9cfe31642bf0a13a8f9aeb07cc95bf2ae87791bd;p=GitHub%2FWoltLab%2FWCF.git Uninitialized variable and comma expression Fixes #3102 --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js index 27ba02821d..660cb68db0 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js @@ -413,12 +413,13 @@ define( var dropdown = _dropdowns.get(targetId), preventToggle = false; if (dropdown !== undefined) { - var button; + var button, parent; // check if the dropdown is still the same, as some components (e.g. page actions) // re-create the parent of a button if (event) { - button = event.currentTarget, parent = button.parentNode; + button = event.currentTarget; + parent = button.parentNode; if (parent !== dropdown) { parent.classList.add('dropdown'); parent.id = dropdown.id;