Skip to content

Commit 1234f73

Browse files
authored
Merge branch 'main' into update-git.colasdn.top/google/go-github
2 parents a8ffd88 + b918a2c commit 1234f73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/web/repo/issue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,8 +1154,8 @@ func NewIssuePost(ctx *context.Context) {
11541154
}
11551155

11561156
log.Trace("Issue created: %d/%d", repo.ID, issue.ID)
1157-
if ctx.FormString("redirect_after_creation") == "project" {
1158-
ctx.Redirect(ctx.Repo.RepoLink + "/projects/" + strconv.FormatInt(form.ProjectID, 10))
1157+
if ctx.FormString("redirect_after_creation") == "project" && projectID > 0 {
1158+
ctx.Redirect(ctx.Repo.RepoLink + "/projects/" + strconv.FormatInt(projectID, 10))
11591159
} else {
11601160
ctx.Redirect(issue.Link())
11611161
}

0 commit comments

Comments
 (0)