diff --git a/app/javascript/controllers/dump_controller.js b/app/javascript/controllers/dump_controller.js index 7c42fc55582..84abccc92c2 100644 --- a/app/javascript/controllers/dump_controller.js +++ b/app/javascript/controllers/dump_controller.js @@ -46,8 +46,9 @@ export default class extends Controller { appendItem(text, uri) { const clone = this.templateTarget.content.cloneNode(true); - const a = clone.querySelector('a > span') - a.textContent = text; + const span = clone.querySelector("a > span"); + const a = clone.querySelector("a"); + span.textContent = text; a.href = uri; this.element.appendChild(clone) }