From: Alexander Ebert Date: Mon, 30 Nov 2020 13:26:56 +0000 (+0100) Subject: Simplified the check by inverting the logic X-Git-Tag: 5.4.0_Alpha_1~571^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d0b1e088e1c48ac329c10825e3b2413b959ca65c;p=GitHub%2FWoltLab%2FWCF.git Simplified the check by inverting the logic --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/RewriteTest.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/RewriteTest.js index 8818a052d8..80a5a3b009 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/RewriteTest.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/RewriteTest.js @@ -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) { diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Acp/Ui/Option/RewriteTest.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Acp/Ui/Option/RewriteTest.ts index 57b981993f..6dcc6eec15 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Acp/Ui/Option/RewriteTest.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Acp/Ui/Option/RewriteTest.ts @@ -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));