diff --git a/js/customElements/commentsDisplay.js b/js/customElements/commentsDisplay.js
index 1aff904e02b739b6918fe31e573c6c5578c2c28b..48a2c5f1739ac052c49f881e1d239af4d44db02b 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");