Skip to content

Commit 69992b7

Browse files
authored
Update gitdiff.go
1 parent ab59aa3 commit 69992b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/gitdiff/gitdiff.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,10 +1339,10 @@ func GetDiffShortStat(gitRepo *git.Repository, beforeCommitID, afterCommitID str
13391339
// Additionally, the database is updated asynchronously if files have changed since the last review
13401340
func SyncUserSpecificDiff(ctx context.Context, userID int64, pull *issues_model.PullRequest, gitRepo *git.Repository, diff *Diff, opts *DiffOptions) (*pull_model.ReviewState, error) {
13411341
review, err := pull_model.GetNewestReviewState(ctx, userID, pull.ID)
1342-
if err != nil || review == nil || review.UpdatedFiles == nil {
1342+
if err != nil {
13431343
return nil, err
13441344
}
1345-
if len(review.UpdatedFiles) == 0 {
1345+
if review == nil || len(review.UpdatedFiles) == 0 {
13461346
return review, nil
13471347
}
13481348

0 commit comments

Comments
 (0)