don't index into empty string

This commit is contained in:
Ted Unangst 2019-05-04 17:47:17 -04:00
parent 996cd76baa
commit d121408464
1 changed files with 1 additions and 1 deletions

View File

@ -845,7 +845,7 @@ func savehonk(w http.ResponseWriter, r *http.Request) {
XID: xid,
Date: dt,
}
if noise[0] == '@' {
if noise != "" && noise[0] == '@' {
honk.Audience = append(grapevine(noise), thewholeworld)
} else {
honk.Audience = prepend(thewholeworld, grapevine(noise))