|
108 | 108 | </tr> |
109 | 109 | {{if and (eq .GetType 3) $hasmatch}} |
110 | 110 | {{$match := index $section.Lines $line.Match}} |
111 | | - {{if or (gt (len $line.Comments) 0) (gt (len $match.Comments) 0)}} |
| 111 | + {{if or $line.Comments $match.Comments}} |
112 | 112 | <tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}"> |
113 | 113 | <td class="add-comment-left" colspan="4"> |
114 | | - {{if gt (len $line.Comments) 0}} |
| 114 | + {{if $line.Comments}} |
115 | 115 | {{if eq $line.GetCommentSide "previous"}} |
116 | 116 | {{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}} |
117 | 117 | {{end}} |
118 | 118 | {{end}} |
119 | | - {{if gt (len $match.Comments) 0}} |
| 119 | + {{if $match.Comments}} |
120 | 120 | {{if eq $match.GetCommentSide "previous"}} |
121 | 121 | {{template "repo/diff/conversation" dict "." $.root "comments" $match.Comments}} |
122 | 122 | {{end}} |
123 | 123 | {{end}} |
124 | 124 | </td> |
125 | 125 | <td class="add-comment-right" colspan="4"> |
126 | | - {{if eq $line.GetCommentSide "proposed"}} |
127 | | - {{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}} |
| 126 | + {{if $line.Comments}} |
| 127 | + {{if eq $line.GetCommentSide "proposed"}} |
| 128 | + {{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}} |
| 129 | + {{end}} |
128 | 130 | {{end}} |
129 | | - {{if gt (len $match.Comments) 0}} |
| 131 | + {{if $match.Comments}} |
130 | 132 | {{if eq $match.GetCommentSide "proposed"}} |
131 | 133 | {{template "repo/diff/conversation" dict "." $.root "comments" $match.Comments}} |
132 | 134 | {{end}} |
133 | 135 | {{end}} |
134 | 136 | </td> |
135 | 137 | </tr> |
136 | 138 | {{end}} |
137 | | - {{else if gt (len $line.Comments) 0}} |
| 139 | + {{else if $line.Comments}} |
138 | 140 | <tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}"> |
139 | 141 | <td class="add-comment-left" colspan="4"> |
140 | | - {{if gt (len $line.Comments) 0}} |
141 | | - {{if eq $line.GetCommentSide "previous"}} |
142 | | - {{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}} |
143 | | - {{end}} |
| 142 | + {{if eq $line.GetCommentSide "previous"}} |
| 143 | + {{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}} |
144 | 144 | {{end}} |
145 | 145 | </td> |
146 | 146 | <td class="add-comment-right" colspan="4"> |
|
0 commit comments