Skip to content

Commit

Permalink
fix(core): 🐛 incorrect section selector
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 committed May 22, 2024
1 parent 8b1158b commit 685901c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/skins.citizen.scripts/sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit 685901c

Please sign in to comment.