From 3a384a6b45fef8c91022b0dcfd189bdd9224c564 Mon Sep 17 00:00:00 2001 From: 1l0 Date: Mon, 14 Oct 2024 04:25:31 +0900 Subject: [PATCH] tags: fix out of range panic --- tags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tags.go b/tags.go index 1cf5f2d..3070880 100644 --- a/tags.go +++ b/tags.go @@ -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 ""