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<
270
270
if ( this . container . debugging || configuration . get ( 'debug' ) ) {
271
271
function addDebuggingInfo ( item : TreeItem , node : ViewNode , parent : ViewNode | undefined ) {
272
272
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 ?? '' ,
274
274
) ;
275
275
276
276
if ( typeof item . tooltip === 'string' ) {
@@ -510,9 +510,10 @@ export abstract class ViewBase<
510
510
511
511
const ensureGroupedHeaderNode = ( children : ViewNode [ ] ) : ViewNode [ ] => {
512
512
if ( ! children . length ) return children ;
513
- if ( children [ 0 ] instanceof GroupedHeaderNode ) return children . length === 1 ? [ ] : children ;
514
513
515
514
const index = children . findIndex ( n => n instanceof GroupedHeaderNode ) ;
515
+ if ( index === 0 ) return children . length === 1 ? [ ] : children ;
516
+
516
517
if ( index === - 1 ) {
517
518
children . unshift ( new GroupedHeaderNode ( this as unknown as View , node ) ) ;
518
519
} else if ( index > 0 ) {
@@ -565,8 +566,8 @@ export abstract class ViewBase<
565
566
( this . grouped
566
567
? `${ this . name . toLocaleLowerCase ( ) } ${ count != null ? ` (${ count } )` : '' } `
567
568
: count != null
568
- ? `(${ count } )`
569
- : '' ) || undefined
569
+ ? `(${ count } )`
570
+ : '' ) || undefined
570
571
) ;
571
572
}
572
573
You can’t perform that action at this time.
0 commit comments