apify-client 3.0.0-beta.39 → 3.0.0-beta.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -402,9 +402,10 @@ export class DatasetClient extends ResourceClient {
402
402
  // TODO: Replace this once https://github.com/apify/apify-core/issues/3503 is solved
403
403
  desc: typeof descHeader === 'string' ? JSON.parse(descHeader) : userProvidedDesc,
404
404
  };
405
+ const scannedCount = response.headers['x-apify-pagination-count'];
406
+ if (scannedCount === undefined)
407
+ return page;
405
408
  // The offset iterator paginates by the scanned number, so it travels with the page outside its public shape.
406
- return Object.defineProperty(page, SCANNED_COUNT, {
407
- value: Number(response.headers['x-apify-pagination-count']) || 0,
408
- });
409
+ return Object.defineProperty(page, SCANNED_COUNT, { value: Number(scannedCount) });
409
410
  }
410
411
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify-client",
3
- "version": "3.0.0-beta.39",
3
+ "version": "3.0.0-beta.40",
4
4
  "description": "Apify API client for JavaScript",
5
5
  "engines": {
6
6
  "node": ">=22.0.0"