From d6aab069ed262aa591e439628ce42e22cdb49db0 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 11 May 2022 04:55:28 +0800 Subject: [PATCH] Fix new release from tags list UI (#19670) (#19673) --- routers/web/repo/release.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go index f2ab8b85f2..b8e0d58e80 100644 --- a/routers/web/repo/release.go +++ b/routers/web/repo/release.go @@ -279,7 +279,9 @@ func NewRelease(ctx *context.Context) { } ctx.Data["tag_name"] = rel.TagName - ctx.Data["tag_target"] = rel.Target + if rel.Target != "" { + ctx.Data["tag_target"] = rel.Target + } ctx.Data["title"] = rel.Title ctx.Data["content"] = rel.Note ctx.Data["attachments"] = rel.Attachments