diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go index 5f894ae50128a..ebc6500802de2 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