From: Fabii547 Date: Mon, 7 Jun 2021 07:37:31 +0000 (+0200) Subject: Fix visibility check in `Condition/Page/Dependence` X-Git-Tag: 5.4.0_Beta_2~29^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3c99caf0dcc0887f9e842f26d29704b37ccb8a0c;p=GitHub%2FWoltLab%2FWCF.git Fix visibility check in `Condition/Page/Dependence` --- diff --git a/ts/WoltLabSuite/Core/Controller/Condition/Page/Dependence.ts b/ts/WoltLabSuite/Core/Controller/Condition/Page/Dependence.ts index 95fba0ae71..1b25b9f2f8 100644 --- a/ts/WoltLabSuite/Core/Controller/Condition/Page/Dependence.ts +++ b/ts/WoltLabSuite/Core/Controller/Condition/Page/Dependence.ts @@ -33,7 +33,7 @@ function checkVisibility(): void { } }); - const irrelevantPageIds = checkedPageIds.filter((pageId) => pageIds.includes(pageId)); + const irrelevantPageIds = checkedPageIds.filter((pageId) => !pageIds.includes(pageId)); if (!checkedPageIds.length || irrelevantPageIds.length) { hideDependentElement(dependentElement); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Condition/Page/Dependence.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Condition/Page/Dependence.js index d4b40cd9b1..c71292df0c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Condition/Page/Dependence.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Condition/Page/Dependence.js @@ -31,7 +31,7 @@ define(["require", "exports", "tslib", "../../../Dom/Util", "../../../Event/Hand checkedPageIds.push(~~page.value); } }); - const irrelevantPageIds = checkedPageIds.filter((pageId) => pageIds.includes(pageId)); + const irrelevantPageIds = checkedPageIds.filter((pageId) => !pageIds.includes(pageId)); if (!checkedPageIds.length || irrelevantPageIds.length) { hideDependentElement(dependentElement); }