Simplified the check by inverting the logic
authorAlexander Ebert <ebert@woltlab.com>
Mon, 30 Nov 2020 13:26:56 +0000 (14:26 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 30 Nov 2020 13:26:56 +0000 (14:26 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/RewriteTest.js
wcfsetup/install/files/ts/WoltLabSuite/Core/Acp/Ui/Option/RewriteTest.ts

index 8818a052d885d2bc86aa65ff366f68a85cbabf07..80a5a3b009254db9d7e48b33bd9f8758db6c9d83 100644 (file)
@@ -81,7 +81,7 @@ define(["require", "exports", "tslib", "../../../Ajax/Request", "../../../Langua
                 });
             });
             const results = await Promise.all(tests.map((test) => test.catch((result) => result)));
-            const passed = !results.some((result) => !result.pass);
+            const passed = results.every((result) => result.pass);
             // Delay the status update to prevent UI flicker.
             await new Promise((resolve) => window.setTimeout(resolve, 500));
             if (passed) {
index 57b981993f9488b8088ddfdedbd9bb87def50a82..6dcc6eec15dab7ae3b633c83e3937aa162ce136b 100644 (file)
@@ -103,7 +103,7 @@ class RewriteTest {
 
     const results: TestResult[] = await Promise.all(tests.map((test) => test.catch((result) => result)));
 
-    const passed = !results.some((result) => !result.pass);
+    const passed = results.every((result) => result.pass);
 
     // Delay the status update to prevent UI flicker.
     await new Promise((resolve) => window.setTimeout(resolve, 500));