From 80999cbf4175155e372a0a742602362af5938dde Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 27 Dec 2024 13:25:10 +0100 Subject: [PATCH] Fix issue with the creation of comments that require approval Closes #6150 --- ts/WoltLabSuite/Core/Component/Comment/List.ts | 10 ---------- .../js/WoltLabSuite/Core/Component/Comment/List.js | 8 -------- 2 files changed, 18 deletions(-) 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}"]`); -- 2.20.1