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 {
22
22
}
23
23
24
24
async getChildren ( ) : Promise < ExplorerNode [ ] > {
25
- let statuses : IGitStatusFileWithCommit [ ] ;
25
+ let statuses : IGitStatusFileWithCommit [ ] = [ ] ;
26
+
26
27
let log : GitLog | undefined ;
27
28
if ( this . range !== undefined ) {
28
29
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
+ }
39
37
}
40
38
41
39
if ( this . status . files . length !== 0 && this . includeWorkingTree ) {
You can’t perform that action at this time.
0 commit comments