File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -22,20 +22,18 @@ export class StatusFilesNode extends ExplorerNode {
2222 }
2323
2424 async getChildren ( ) : Promise < ExplorerNode [ ] > {
25- let statuses : IGitStatusFileWithCommit [ ] ;
25+ let statuses : IGitStatusFileWithCommit [ ] = [ ] ;
26+
2627 let log : GitLog | undefined ;
2728 if ( this . range !== undefined ) {
2829 log = await this . git . getLogForRepo ( this . status . repoPath , this . range , this . maxCount ) ;
29- if ( log === undefined ) return [ ] ;
30-
31- statuses = Array . from ( Iterables . flatMap ( log . commits . values ( ) , c => {
32- return c . fileStatuses . map ( s => {
33- return { ...s , commit : c } as IGitStatusFileWithCommit ;
34- } ) ;
35- } ) ) ;
36- }
37- else {
38- statuses = [ ] ;
30+ if ( log !== undefined ) {
31+ statuses = Array . from ( Iterables . flatMap ( log . commits . values ( ) , c => {
32+ return c . fileStatuses . map ( s => {
33+ return { ...s , commit : c } as IGitStatusFileWithCommit ;
34+ } ) ;
35+ } ) ) ;
36+ }
3937 }
4038
4139 if ( this . status . files . length !== 0 && this . includeWorkingTree ) {
You can’t perform that action at this time.
0 commit comments