Don't summarize boosts if there are none

This commit is contained in:
Jose Farias
2024-10-24 17:36:26 -06:00
parent c57f18c20c
commit 2dd719e94b
@@ -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() {