chore: fix panic
This commit is contained in:
parent
7d336285bf
commit
73eaac5bc6
@ -180,6 +180,10 @@ func (r *HTWriter) WriteTo(w io.Writer) (int64, error) {
|
||||
Host: "unknown.txt",
|
||||
}
|
||||
}
|
||||
subject := ""
|
||||
if s := twt.Subject(); s != nil {
|
||||
subject = s.Tag().Text()
|
||||
}
|
||||
i, err = fmt.Fprintf(w, `
|
||||
<article>
|
||||
<header class="u-author h-card">
|
||||
@ -214,8 +218,8 @@ func (r *HTWriter) WriteTo(w io.Writer) (int64, error) {
|
||||
`, "/?uri="+twter.URI, twter.Avatar,
|
||||
"/?uri="+twter.URI, twter.Nick,
|
||||
twter.URI, uri.Host,
|
||||
"/conv/"+twt.Subject().Tag().Text(), fmt.Sprintf("<time datetime='%s'>%s</time>", twt.Created().Format(time.RFC3339), twt.Created().Format(time.RFC822)),
|
||||
"/conv/"+twt.Subject().Tag().Text(),
|
||||
"/conv/"+subject, fmt.Sprintf("<time datetime='%s'>%s</time>", twt.Created().Format(time.RFC3339), twt.Created().Format(time.RFC822)),
|
||||
"/conv/"+subject,
|
||||
twt,
|
||||
)
|
||||
output += int64(i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user