Skip to content

Commit

Permalink
tags: fix out of range panic
Browse files Browse the repository at this point in the history
  • Loading branch information
1l0 authored and fiatjaf committed Oct 14, 2024
1 parent 97ed96e commit 9e744e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (tag Tag) Value() string {
}

func (tag Tag) Relay() string {
if (tag[0] == "e" || tag[0] == "p") && len(tag) > 2 {
if len(tag) > 2 && (tag[0] == "e" || tag[0] == "p") {
return NormalizeURL(tag[2])
}
return ""
Expand Down

0 comments on commit 9e744e1

Please sign in to comment.