Handle added and deleted files correctly

This commit is contained in:
René Pfeuffer
2020-05-28 19:51:51 +02:00
parent abca9e9746
commit 2efd21d466
4 changed files with 115 additions and 17 deletions

View File

@@ -299,7 +299,7 @@ class DiffFile extends React.Component<Props, State> {
<div className="panel-block is-paddingless">
{fileAnnotations}
<TokenizedDiffView className={viewType} viewType={viewType} file={file}>
{(hunks: HunkType[]) => hunks.map((hunk, n) => this.renderHunk(file, diffExpander.getHunk(n), n))}
{(hunks: HunkType[]) => hunks?.map((hunk, n) => this.renderHunk(file, diffExpander.getHunk(n), n))}
</TokenizedDiffView>
</div>
);