fix(core): 🐛 incorrect section selector

This commit is contained in:
alistair3149 2024-05-21 23:15:53 -04:00
parent 8b1158bc78
commit 685901cce3
No known key found for this signature in database

View file

@ -55,11 +55,11 @@ function init( bodyContent ) {
const heading = target.closest( '.citizen-section-heading' );
if ( heading ) {
const i = +heading.getAttribute( 'data-mw-citizen-section-heading-index' );
const headline = heading.querySelector( '.mw-headline' ) ||
heading.querySelector( '.mw-heading' );
if ( headline ) {
const i = +headline.getAttribute( 'data-mw-citizen-section-heading-index' );
toggleClasses( i );
toggleAriaExpanded( headline );
}