From 16688f95e734278fb0f96c608e40af08706c4f2f Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 21 Dec 2021 16:56:49 -0800 Subject: [PATCH] Fix bookmark card being created without the h2. --- frontends/etiquette_flask/static/js/cards.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontends/etiquette_flask/static/js/cards.js b/frontends/etiquette_flask/static/js/cards.js index 0a8d47a..2f290c2 100644 --- a/frontends/etiquette_flask/static/js/cards.js +++ b/frontends/etiquette_flask/static/js/cards.js @@ -78,11 +78,13 @@ function create(bookmark, add_author, add_delete_button, add_url_element) bookmark_card.className = "bookmark_card" bookmark_card.dataset.id = bookmark.id; + const h2 = document.createElement("h2"); const bookmark_title = document.createElement("a"); bookmark_title.className = "bookmark_title"; bookmark_title.href = bookmark.url; bookmark_title.innerText = bookmark.display_name; - bookmark_card.appendChild(bookmark_title); + h2.appendChild(bookmark_title); + bookmark_card.appendChild(h2); // The URL element is always display:none, but its presence is useful in // facilitating the Editor object. If this bookmark will not be editable,