Skip to content

Commit

Permalink
fix: has more pages
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikZed committed Mar 10, 2023
1 parent 345f1d9 commit 6d0c207
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@trieb.work/zoho-ts",
"version": "0.6.3",
"version": "0.6.4",
"description": "Node Library for Zoho Inventory, Invoice and Zoho Books",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/service/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export class PackageHandler {

packages.push(...res.packages);
if (!res.page_context) continue;
if (opts.limit && packages.length >= opts.limit) continue;
hasMorePages = res.page_context?.has_more_page ?? false;
if (opts.limit && packages.length >= opts.limit) hasMorePages = false;
page = res.page_context.page + 1 ?? 0 + 1;
}

Expand Down

0 comments on commit 6d0c207

Please sign in to comment.