File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1+ --- 
2+ " gitbook "  : patch 
3+ --- 
4+ 
5+ Fix icon resolution for page group
Original file line number Diff line number Diff line change @@ -177,14 +177,15 @@ export async function resolveContentRef(
177177                } 
178178            }  else  { 
179179                const  parentPage  =  ( resolvePageResult ?. ancestors  ||  [ ] ) . slice ( - 1 ) . pop ( ) ; 
180-                 // When the looked up ref was a page group we use the page group title as resolved ref text . 
181-                 // Otherwise use the resolved page title. 
182-                 text  = 
180+                 // When the looked up ref was a page group we use the page group to resolve title and icon . 
181+                 // Otherwise use the resolved page title and icon . 
182+                 const   pageOrGroup  = 
183183                    parentPage  &&  contentRef . page  ===  parentPage . id  &&  parentPage . type  ===  'group' 
184-                         ? parentPage . title 
185-                         : page . title ; 
184+                         ? parentPage 
185+                         : page ; 
186+                 text  =  pageOrGroup . title ; 
186187                emoji  =  isCurrentPage  ? undefined  : page . emoji ; 
187-                 icon  =  < PageIcon  page = { page }  style = { iconStyle }  /> ; 
188+                 icon  =  < PageIcon  page = { pageOrGroup }  style = { iconStyle }  /> ; 
188189            } 
189190
190191            return  { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments