Skip to content

Commit 5057b89

Browse files
committed
chat/message: Handle nil theme (mono)
Fixes #310
1 parent 338ded7 commit 5057b89

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

chat/message/theme.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ func (theme Theme) Highlight(s string) string {
165165

166166
// Timestamp colorizes the timestamp.
167167
func (theme Theme) Timestamp(s string) string {
168+
if theme.sys == nil {
169+
return s
170+
}
168171
return theme.sys.Format(s)
169172
}
170173

0 commit comments

Comments
 (0)