html: don't crash on empty notes list
This commit is contained in:
parent
dca0706fc5
commit
33930ccdcc
|
@ -400,6 +400,7 @@ namespace SparkleShare {
|
|||
if (change_set.SupportsNotes) {
|
||||
comments = "<table class=\"comments\">";
|
||||
|
||||
if (change_set.Notes != null) {
|
||||
change_set.Notes.Sort ((x, y) => (x.Timestamp.CompareTo (y.Timestamp)));
|
||||
|
||||
foreach (SparkleNote note in change_set.Notes) {
|
||||
|
@ -411,6 +412,7 @@ namespace SparkleShare {
|
|||
" <td class=\"comment-text\" colspan=\"2\">" + note.Body + "</td>" +
|
||||
"</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
comments += "</table>";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue