File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ export abstract class ViewBase<
270270 if ( this . container . debugging || configuration . get ( 'debug' ) ) {
271271 function addDebuggingInfo ( item : TreeItem , node : ViewNode , parent : ViewNode | undefined ) {
272272 item . tooltip ??= new MarkdownString (
273- item . label != null && typeof item . label !== 'string' ? item . label . label : ( item . label ?? '' ) ,
273+ item . label != null && typeof item . label !== 'string' ? item . label . label : item . label ?? '' ,
274274 ) ;
275275
276276 if ( typeof item . tooltip === 'string' ) {
@@ -510,9 +510,10 @@ export abstract class ViewBase<
510510
511511 const ensureGroupedHeaderNode = ( children : ViewNode [ ] ) : ViewNode [ ] => {
512512 if ( ! children . length ) return children ;
513- if ( children [ 0 ] instanceof GroupedHeaderNode ) return children . length === 1 ? [ ] : children ;
514513
515514 const index = children . findIndex ( n => n instanceof GroupedHeaderNode ) ;
515+ if ( index === 0 ) return children . length === 1 ? [ ] : children ;
516+
516517 if ( index === - 1 ) {
517518 children . unshift ( new GroupedHeaderNode ( this as unknown as View , node ) ) ;
518519 } else if ( index > 0 ) {
@@ -565,8 +566,8 @@ export abstract class ViewBase<
565566 ( this . grouped
566567 ? `${ this . name . toLocaleLowerCase ( ) } ${ count != null ? ` (${ count } )` : '' } `
567568 : count != null
568- ? `(${ count } )`
569- : '' ) || undefined
569+ ? `(${ count } )`
570+ : '' ) || undefined
570571 ) ;
571572 }
572573
You can’t perform that action at this time.
0 commit comments