view: Be more defensive when working with message subject.
authorRicardo Wurmus <rekado@elephly.net>
Fri, 9 Nov 2018 21:41:03 +0000 (22:41 +0100)
committerRicardo Wurmus <rekado@elephly.net>
Fri, 9 Nov 2018 21:41:03 +0000 (22:41 +0100)
* mumi/web/view/html.scm (issue-page): Ensure that the message subject
is always a string before comparing it.

mumi/web/view/html.scm

index fcb731f..4af8d5f 100644 (file)
@@ -281,7 +281,8 @@ range.  The supported arguments are the same as for "
                  (a (@ (href ,(string-append "#" (number->string
                                                   message-number))))
                     ,(date->string (date message)))))
-          ,@(if (string-suffix? previous-subject (subject message))
+          ,@(if (string-suffix? (or previous-subject "")
+                                (or (subject message) ""))
                 '()
                 `((div (@ (class "subject")) ,(subject message))))
           (div