forked from Gitlink/gitea-1156
fix: compare return follow old version
This commit is contained in:
parent
b82bc09645
commit
5fafa1c529
|
@ -1152,8 +1152,13 @@ func PrepareCompareDiff(
|
|||
ctx.ServerError("GetDiffRange", err)
|
||||
return false
|
||||
}
|
||||
if diff.NumFiles == 0 {
|
||||
ctx.Data["Diff"] = nil
|
||||
ctx.Data["DiffNotAvailable"] = true
|
||||
} else {
|
||||
ctx.Data["Diff"] = diff
|
||||
ctx.Data["DiffNotAvailable"] = diff.NumFiles == 0
|
||||
ctx.Data["DiffNotAvailable"] = false
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue