From 0f4c5b8ce2d8ea2a31810196e63fba8832714089 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 8 Dec 2016 15:54:19 +0100 Subject: [PATCH] Fixed potential infinite loop --- .../files/js/WoltLabSuite/Core/Bbcode/Collapsible.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js index 3a86bf88da..a2e4994cfc 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js @@ -21,11 +21,7 @@ define([], function() { container = _containers[0]; toggleButton = elBySelAll('.toggleButton', container)[0]; - if (toggleButton === undefined) { - continue; - } - - if (toggleButton.closest('.jsCollapsibleBbcode') === container) { + if (toggleButton && toggleButton.closest('.jsCollapsibleBbcode') === container) { (function (container, toggleButton) { var toggle = function (event) { if (container.classList.toggle('collapsed')) { -- 2.20.1