Skip to content

Commit 4c97a67

Browse files
fixes possible nil reference
1 parent fce10ae commit 4c97a67

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/github/projects.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,14 @@ func ListProjects(getClient GetClientFn, t translations.TranslationHelperFunc) (
7171
var projects []*github.ProjectV2
7272
minimalProjects := []MinimalProject{}
7373

74+
var queryPtr *string
75+
if queryStr != "" {
76+
queryPtr = &queryStr
77+
}
78+
7479
opts := &github.ListProjectsOptions{
7580
ListProjectsPaginationOptions: github.ListProjectsPaginationOptions{PerPage: &perPage},
76-
Query: &queryStr,
81+
Query: queryPtr,
7782
}
7883

7984
if ownerType == "org" {

0 commit comments

Comments
 (0)