mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
* Prevent NPE on commenting on lines with invalidated comments Only check for a review if we are replying to a previous review. Prevent the NPE in #12239 by assuming that a comment without a Review is non-pending. Fix #12239 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add hack around to show the broken comments Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -149,7 +149,10 @@
|
||||
{{if gt (len $line.Comments) 0}}
|
||||
{{$resolved := (index $line.Comments 0).IsResolved}}
|
||||
{{$resolveDoer := (index $line.Comments 0).ResolveDoer}}
|
||||
{{$isNotPending := (not (eq (index $line.Comments 0).Review.Type 0))}}
|
||||
{{$isNotPending := false}}
|
||||
{{if (index $line.Comments 0).Review}}
|
||||
{{$isNotPending = (not (eq (index $line.Comments 0).Review.Type 0))}}
|
||||
{{end}}
|
||||
<tr class="add-code-comment">
|
||||
<td class="lines-num"></td>
|
||||
<td class="lines-type-marker"></td>
|
||||
|
Reference in New Issue
Block a user