File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 87
87
}
88
88
if ( navItem === currentPageItem ) return
89
89
find ( menuPanel , '.nav-item.is-active' ) . forEach ( function ( el ) {
90
- el . classList . remove ( 'is-active ' , 'is-current-path ' , 'is-current-page ' )
90
+ el . classList . remove ( 'is-current-path ' , 'is-current-page ' , 'is-active ' )
91
91
} )
92
- navItem . classList . add ( 'is-current-page' )
93
- currentPageItem = navItem
94
- activateCurrentPath ( navItem )
92
+ ; ( currentPageItem = navItem ) . classList . add ( 'is-current-page' )
93
+ activateCurrentPath ( currentPageItem )
95
94
scrollItemToMidpoint ( menuPanel , navLink )
96
95
}
97
96
105
104
var ancestor = navItem . parentNode
106
105
while ( ! ( ancestorClasses = ancestor . classList ) . contains ( 'nav-menu' ) ) {
107
106
if ( ancestor . tagName === 'LI' && ancestorClasses . contains ( 'nav-item' ) ) {
108
- ancestorClasses . add ( 'is-active' )
109
107
if ( trace !== false ) ancestorClasses . add ( 'is-current-path' )
108
+ ancestorClasses . add ( 'is-active' )
110
109
}
111
110
ancestor = ancestor . parentNode
112
111
}
You can’t perform that action at this time.
0 commit comments