From: Alexander Ebert Date: Thu, 8 Dec 2016 14:54:19 +0000 (+0100) Subject: Fixed potential infinite loop X-Git-Tag: 3.0.0_RC_1~72 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f4c5b8ce2d8ea2a31810196e63fba8832714089;p=GitHub%2FWoltLab%2FWCF.git Fixed potential infinite loop --- 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')) {