From ca67feea04d954be4b7217990aa18fc3774bac75 Mon Sep 17 00:00:00 2001 From: "Stanislav (Stas) Katkov" Date: Wed, 1 Jan 2025 21:26:58 +0100 Subject: [PATCH] Add href attribute with a link to pg dump for each list element on /pages/dump --- app/javascript/controllers/dump_controller.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) }