From: Marcel Werk Date: Fri, 27 Dec 2024 12:25:10 +0000 (+0100) Subject: Fix issue with the creation of comments that require approval X-Git-Tag: 6.1.3_dev_1~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=80999cbf4175155e372a0a742602362af5938dde;p=GitHub%2FWoltLab%2FWCF.git Fix issue with the creation of comments that require approval Closes #6150 --- diff --git a/ts/WoltLabSuite/Core/Component/Comment/List.ts b/ts/WoltLabSuite/Core/Component/Comment/List.ts index c426f097bc..f531810a69 100644 --- a/ts/WoltLabSuite/Core/Component/Comment/List.ts +++ b/ts/WoltLabSuite/Core/Component/Comment/List.ts @@ -352,11 +352,6 @@ class CommentList { async #loadCreatedComment(commentId: number): Promise { const response = await renderComment(commentId); if (!response.ok) { - const validationError = response.error.getValidationError(); - if (validationError === undefined) { - throw new Error("Unexpected validation error", { cause: response.error }); - } - return; } @@ -374,11 +369,6 @@ class CommentList { async #loadCreatedResponse(commentId: number, responseId: number): Promise { const response = await renderResponse(responseId); if (!response.ok) { - const validationError = response.error.getValidationError(); - if (validationError === undefined) { - throw new Error("Unexpected validation error", { cause: response.error }); - } - return; } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Comment/List.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Comment/List.js index 1dac6b10b4..d40eccf369 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Comment/List.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Comment/List.js @@ -257,10 +257,6 @@ define(["require", "exports", "tslib", "../../Dom/Change/Listener", "../../Dom/U async #loadCreatedComment(commentId) { const response = await (0, RenderComment_1.renderComment)(commentId); if (!response.ok) { - const validationError = response.error.getValidationError(); - if (validationError === undefined) { - throw new Error("Unexpected validation error", { cause: response.error }); - } return; } const referenceElement = this.#container.querySelector(".commentAdd").parentElement; @@ -274,10 +270,6 @@ define(["require", "exports", "tslib", "../../Dom/Change/Listener", "../../Dom/U async #loadCreatedResponse(commentId, responseId) { const response = await (0, RenderResponse_1.renderResponse)(responseId); if (!response.ok) { - const validationError = response.error.getValidationError(); - if (validationError === undefined) { - throw new Error("Unexpected validation error", { cause: response.error }); - } return; } const item = this.#container.querySelector(`.commentList__item[data-comment-id="${commentId}"]`);