Fix visibility check in `Condition/Page/Dependence`
authorFabii547 <Fabii547@users.noreply.github.com>
Mon, 7 Jun 2021 07:37:31 +0000 (09:37 +0200)
committerFabii547 <Fabii547@users.noreply.github.com>
Mon, 7 Jun 2021 07:37:31 +0000 (09:37 +0200)
ts/WoltLabSuite/Core/Controller/Condition/Page/Dependence.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Condition/Page/Dependence.js

index 95fba0ae7146023a71a30b33439cb0189a4fe4aa..1b25b9f2f8ca62f90bb1fa0372335aac862231f2 100644 (file)
@@ -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);
index d4b40cd9b1382184b6c2b9ab985b4befe1c06b92..c71292df0cb6312831a7b28e807eb3c76a5bf28f 100644 (file)
@@ -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);
             }