@@ -80,11 +80,13 @@ const completedFeaturesList = [
8080function  findCurrentPage ( path ,  items )  { 
8181    for  ( const  item  of  items )  { 
8282        const  itemPath  =  [ item ,  ...path ] ; 
83-         if  ( 
84-             window . location . href . endsWith ( "/"  +  item . href )  || 
85-             window . location . href . endsWith ( "/"  +  item . key ) 
86-         )  { 
87-             return  itemPath ; 
83+         if  ( window . location . href . endsWith ( "/"  +  item . href ) )  { 
84+             return  itemPath ; 
85+         } 
86+         for  ( let  key  of  item . keys )  { 
87+             if  ( window . location . href . endsWith ( "/"  +  item . key ) )  { 
88+                 return  itemPath ; 
89+             } 
8890        } 
8991
9092        const  recursivePath  =  findCurrentPage ( itemPath ,  item . items ) ; 
@@ -199,7 +201,7 @@ const app = createApp({
199201        const  sectionTitle  =  ref ( currentPage ?. [ 0 ] ?. title  ||  "Essential C#" ) ; 
200202        const  expandedTocs  =  reactive ( new  Set ( ) ) ; 
201203        for  ( const  item  of  currentPage )  { 
202-             expandedTocs . add ( item . key ) ; 
204+             expandedTocs . add ( item . keys ) ; 
203205        } 
204206
205207        // hide the sidebar when resizing to small screen 
@@ -269,15 +271,15 @@ const app = createApp({
269271                expandedTocs . clear ( ) ; 
270272                // If a search query is removed, open the TOC for the current page. 
271273                for  ( const  item  of  currentPage )  { 
272-                     expandedTocs . add ( item . key ) ; 
274+                     expandedTocs . add ( item . keys ) ; 
273275                } 
274276            } 
275277            else  { 
276278                expandedTocs . clear ( ) ; 
277279                const  query  =  normalizeString ( newQuery ) ; 
278280                tocData . forEach ( item  =>  { 
279281                    if  ( filterItem ( item ,  query ) )  { 
280-                         expandedTocs . add ( item . key ) ; 
282+                         expandedTocs . add ( item . keys ) ; 
281283                    } 
282284                } ) ; 
283285            } 
0 commit comments