Don't use label span in menu item template

This commit is contained in:
Nicolò P 2025-06-04 13:39:57 +02:00
parent af9516dde0
commit 0e979ca5c5
2 changed files with 1 additions and 3 deletions

View File

@ -79,7 +79,6 @@
data-action="marker#go" data-action="marker#go"
data-marker-coords-value="" data-marker-coords-value=""
data-marker-group-value=""> data-marker-group-value="">
<span class="label"></span>
</a> </a>
</li> </li>
</template> </template>

View File

@ -35,11 +35,10 @@ export default class extends Controller {
if (marker.options.municipality === municipality) { if (marker.options.municipality === municipality) {
const clone = template.content.cloneNode(true); const clone = template.content.cloneNode(true);
const link = clone.querySelector('a'); const link = clone.querySelector('a');
const labelSpan = clone.querySelector('.label');
link.dataset.markerCoordsValue = key; link.dataset.markerCoordsValue = key;
link.dataset.markerGroupValue = group; link.dataset.markerGroupValue = group;
labelSpan.textContent = marker.options.label; link.textContent = marker.options.label;
ul.appendChild(clone); ul.appendChild(clone);
} }