File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,15 +168,13 @@ function setupShortcuts(shortcutDepth = 2) {
168168 const shortcuts = Array . from (
169169 document . querySelectorAll ( "#shortcuts div:not(#shortcuts-header)" ) ,
170170 ) ;
171- if ( shortcuts . length == 0 ) {
172- const shortcutsContainer = document . getElementById ( "shortcuts-container" ) ;
173- if ( shortcutsContainer ) {
171+ const shortcutsContainer = document . getElementById ( "shortcuts-container" ) ;
172+
173+ if ( shortcutsContainer ) {
174+ if ( shortcuts . length == 0 ) {
174175 shortcutsContainer . style . display = "none" ;
175- }
176- } else {
177- const shortcutsContainer = document . getElementById ( "shortcuts-container" ) ;
178- if ( shortcutsContainer && shortcutsContainer . style . display === "none" ) {
179- shortcutsContainer . style . display = "" ;
176+ } else {
177+ shortcutsContainer . style . display = "" ; // make shortcuts display visible, if hidden
180178 }
181179 }
182180
You can’t perform that action at this time.
0 commit comments