From a7a21aab088a757b0871c5bc10fc660496bbd71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Sat, 29 Feb 2020 21:25:37 +0100 Subject: [PATCH] Fix toggle state when there are no hidden members --- config/jsdoc/api/template/static/scripts/main.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/config/jsdoc/api/template/static/scripts/main.js b/config/jsdoc/api/template/static/scripts/main.js index 8a053e5c7a..5a705ab243 100644 --- a/config/jsdoc/api/template/static/scripts/main.js +++ b/config/jsdoc/api/template/static/scripts/main.js @@ -233,18 +233,8 @@ $(function () { return; } const clsItem = $(this).closest('.item'); - let show; - if (clsItem.hasClass('toggle-manual-show')) { - show = false; - } else if (clsItem.hasClass('toggle-manual-hide')) { - show = true; - } else { - clsItem.find('.member-list li').each(function (i, v) { - show = $(v).is(':hidden'); - return !show; - }); - } - search.manualToggle(clsItem, !!show); + const show = !clsItem.hasClass('toggle-manual-show'); + search.manualToggle(clsItem, show); }); // Auto resizing on navigation