Skip to content

Commit 0f32ec5

Browse files
Fix pagination issue
1 parent 386f0ca commit 0f32ec5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/amadeus/client/pagination.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ class Pagination {
6464
*/
6565
pageNumber(response, pageName) {
6666
try {
67-
return response.result['meta']['links'][pageName].split('=').pop();
67+
return response.result['meta']['links'][pageName]
68+
.split('page%5Boffset%5D=')[1].split('&')[0]
6869
} catch (TypeError) {
6970
return null;
7071
}

0 commit comments

Comments
 (0)