Skip to content

Commit

Permalink
supress empty string nextlink url
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyeqf committed Oct 18, 2024
1 parent 4219157 commit 7094cab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdk/client/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
/nextResp, err := c.ExecutePaged(ctx, req)/ Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package client
Expand Down Expand Up @@ -615,7 +615,8 @@ func (c *Client) ExecutePaged(ctx context.Context, req *Request) (*Response, err
return resp, err
}
}
if nextLink == nil {

if nextLink == nil || nextLink == "" {
// This is the last page
return resp, nil
}
Expand Down

0 comments on commit 7094cab

Please sign in to comment.