From: Alexander Ebert Date: Sun, 28 Feb 2021 12:42:00 +0000 (+0100) Subject: Incorrect handling of sync errors X-Git-Tag: 5.4.0_Alpha_1~212 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b49c9ead6e53fa201a58484da50bcd42ade0ce90;p=GitHub%2FWoltLab%2FWCF.git Incorrect handling of sync errors Fixes #3946 --- diff --git a/ts/WoltLabSuite/Core/Acp/Ui/Devtools/Project/Sync.ts b/ts/WoltLabSuite/Core/Acp/Ui/Devtools/Project/Sync.ts index ec7428845a..62fdbb7570 100644 --- a/ts/WoltLabSuite/Core/Acp/Ui/Devtools/Project/Sync.ts +++ b/ts/WoltLabSuite/Core/Acp/Ui/Devtools/Project/Sync.ts @@ -225,7 +225,7 @@ class AcpUiDevtoolsProjectSync { this.buttonSyncAll!.classList.remove("disabled"); - return false; + return true; } _ajaxSetup(): ReturnType { diff --git a/ts/WoltLabSuite/Core/Ajax/Request.ts b/ts/WoltLabSuite/Core/Ajax/Request.ts index 366393ebc0..9a533ba156 100644 --- a/ts/WoltLabSuite/Core/Ajax/Request.ts +++ b/ts/WoltLabSuite/Core/Ajax/Request.ts @@ -303,7 +303,7 @@ class AjaxRequest { let details = ""; let message: string; - if (data !== null) { + if (data !== null && Object.keys(data).length > 0) { if (data.returnValues && data.returnValues.description) { details += `

Description:

${data.returnValues.description}

`; } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Devtools/Project/Sync.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Devtools/Project/Sync.js index e98b833bf9..a08f8613a8 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Devtools/Project/Sync.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Devtools/Project/Sync.js @@ -151,7 +151,7 @@ define(["require", "exports", "tslib", "../../../../Ajax", "../../../../Language Dialog_1.default.open(this, Ajax.getRequestObject(this).getErrorHtml(data, xhr)); }); this.buttonSyncAll.classList.remove("disabled"); - return false; + return true; } _ajaxSetup() { return { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js index c3e5bcaa12..c00e0b6722 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js @@ -253,7 +253,7 @@ define(["require", "exports", "tslib", "./Status", "../Core", "../Dom/Change/Lis getErrorHtml(data, xhr) { let details = ""; let message; - if (data !== null) { + if (data !== null && Object.keys(data).length > 0) { if (data.returnValues && data.returnValues.description) { details += `

Description:

${data.returnValues.description}

`; }