async #loadCreatedComment(commentId: number): Promise<void> {
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;
}
async #loadCreatedResponse(commentId: number, responseId: number): Promise<void> {
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;
}
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;
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}"]`);