From 7fe912b1722c07dacdb5d94170731692c88d3110 Mon Sep 17 00:00:00 2001
From: Jonas Leder <jonas.leder@jobrouter.com>
Date: Mon, 14 Mar 2022 15:37:35 +0100
Subject: [PATCH] add option to regenerate comments

---
 js/customElements/commentsDisplay.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/js/customElements/commentsDisplay.js b/js/customElements/commentsDisplay.js
index 1aff904..48a2c5f 100644
--- a/js/customElements/commentsDisplay.js
+++ b/js/customElements/commentsDisplay.js
@@ -16,6 +16,7 @@ class commentsDisplay extends HTMLElement {
         body: graphql,
         };
         let comments = (await (await fetch("http://localhost:1234/API/graphql.php", requestOptions)).json()).data.comments;
+        this.innerHTML = "";
         comments.forEach((element) => {
             const h3 = document.createElement("h3");
             h3.classList.add("commentTitle");
-- 
GitLab