Skip to content

Commit da5050c

Browse files
committed
fix routers/api/v1/repo/issue.go
1 parent 739acee commit da5050c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

routers/api/v1/repo/issue.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ func SearchIssues(ctx *context.APIContext) {
141141
keyword = ""
142142
}
143143
var issueIDs []int64
144-
var labelIDs []int64
145144
if len(keyword) > 0 && len(repoIDs) > 0 {
146145
if issueIDs, err = issue_indexer.SearchIssuesByKeyword(repoIDs, keyword); err != nil {
147146
ctx.Error(http.StatusInternalServerError, "SearchIssuesByKeyword", err)
@@ -176,7 +175,7 @@ func SearchIssues(ctx *context.APIContext) {
176175

177176
// Only fetch the issues if we either don't have a keyword or the search returned issues
178177
// This would otherwise return all issues if no issues were found by the search.
179-
if len(keyword) == 0 || len(issueIDs) > 0 || len(labelIDs) > 0 {
178+
if len(keyword) == 0 || len(issueIDs) > 0 || len(includedLabelNames) > 0 {
180179
issuesOpt := &models.IssuesOptions{
181180
ListOptions: models.ListOptions{
182181
Page: ctx.QueryInt("page"),

0 commit comments

Comments
 (0)