From 9cfe31642bf0a13a8f9aeb07cc95bf2ae87791bd Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 14 Nov 2019 14:38:18 +0100 Subject: [PATCH] Uninitialized variable and comma expression Fixes #3102 --- .../install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.20.1