diff --git a/client/team.go b/client/team.go index b584740c..711d7a1c 100644 --- a/client/team.go +++ b/client/team.go @@ -101,7 +101,7 @@ func (client *ApiClient) GetTeams(params map[string]string) ([]Team, error) { teams = append(teams, res.Teams...) nextPageKey := res.NextPageKey - if nextPageKey == "" { + if nextPageKey == "" || len(res.Teams) == 0 { break }