chore: guard on nil
This commit is contained in:
parent
f52827d62a
commit
922a1b1327
@ -182,7 +182,9 @@ func (r *HTWriter) WriteTo(w io.Writer) (int64, error) {
|
||||
}
|
||||
subject := ""
|
||||
if s := twt.Subject(); s != nil {
|
||||
subject = s.Tag().Text()
|
||||
if tag, ok := s.Tag().(*lextwt.Tag); ok {
|
||||
subject = tag.Text()
|
||||
}
|
||||
}
|
||||
i, err = fmt.Fprintf(w, `
|
||||
<article>
|
||||
|
Loading…
x
Reference in New Issue
Block a user