chat/message: Handle nil theme (mono)

Fixes #310
This commit is contained in:
Andrey Petrov 2019-03-24 18:59:16 -04:00
parent 338ded7a4e
commit 5057b891c0
1 changed files with 3 additions and 0 deletions

View File

@ -165,6 +165,9 @@ func (theme Theme) Highlight(s string) string {
// Timestamp colorizes the timestamp. // Timestamp colorizes the timestamp.
func (theme Theme) Timestamp(s string) string { func (theme Theme) Timestamp(s string) string {
if theme.sys == nil {
return s
}
return theme.sys.Format(s) return theme.sys.Format(s)
} }