diff --git a/app/javascript/controllers/rollup_controller.js b/app/javascript/controllers/rollup_controller.js index 57df6cf71..5fba9faca 100644 --- a/app/javascript/controllers/rollup_controller.js +++ b/app/javascript/controllers/rollup_controller.js @@ -8,10 +8,12 @@ export default class extends Controller { } #summarizeBoosts() { - const el = document.createElement("span") - el.dataset.turboTemporary = "" - el.textContent = this.#boostSumaries.toSentence() - this.element.appendChild(el) + if (this.hasBoostEventTargets) { + const el = document.createElement("span") + el.dataset.turboTemporary = "" + el.textContent = this.#boostSumaries.toSentence() + this.element.appendChild(el) + } } get #boostSumaries() {