Skip to content

Commit d92d8b3

Browse files
committed
Fix panic while accessing nil pagination
This fixes a panic that would occur while trying to assign some data to `data.Pagination`, which was nil in this scope.
1 parent 7056cda commit d92d8b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/api/api.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ func NewRequest(method string, path string, queryParameters []string, body []byt
110110
}
111111

112112
if autopaginate == false {
113-
data.Pagination.Cursor = apiResponse.Pagination.Cursor
113+
data.Pagination = &models.APIPagination{
114+
Cursor: apiResponse.Pagination.Cursor,
115+
}
114116
break
115117
}
116118

0 commit comments

Comments
 (0)