Commit 11477441 authored by Hoto Cocoa's avatar Hoto Cocoa

Fix navbar root menu not working with single dropdown menu

parent 8a5d907e
Pipeline #32069124 passed with stage
in 2 minutes and 31 seconds
......@@ -669,7 +669,7 @@ class LibertyTemplate extends BaseTemplate {
'class' => [ 'dropdown', 'nav-item' ]
] );
array_push( $content['classes'], 'nav-link' );
if ( is_array( $content['children'] ) && count( $content['children'] ) > 2 ) {
if ( is_array( $content['children'] ) && count( $content['children'] ) ) {
array_push( $content['classes'], 'dropdown-toggle', 'dropdown-toggle-fix' );
}
......@@ -694,7 +694,7 @@ class LibertyTemplate extends BaseTemplate {
}
echo Html::closeElement( 'a' );
if ( is_array( $content['children'] ) && count( $content['children'] ) > 2 ) {
if ( is_array( $content['children'] ) && count( $content['children'] ) ) {
// We should fix this
array_shift( $content['children'] );
echo Html::openElement( 'div', [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment