Skip to content

Commit aa49a3a

Browse files
authored
Adding a second condition just in case
1 parent 61b0fe3 commit aa49a3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/codespaces/api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func (a *API) ListCodespaces(ctx context.Context) (codespaces []*Codespace, err
200200
if err != nil {
201201
return nil, fmt.Errorf("%w", err)
202202
}
203-
if len(codespaces) >= response.TotalCount {
203+
if len(codespaces) >= response.TotalCount || len(response.Codespaces) == 0 {
204204
break
205205
}
206206
codespaces = append(codespaces, response.Codespaces...)

0 commit comments

Comments
 (0)