Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

Fix NaN condition

Ondra Urban3ec02c3d3ed1
diff --git a/src/autoscaling/snapshotter.js b/src/autoscaling/snapshotter.js
index 96fa2e7b7..297e059d5 100644
--- a/src/autoscaling/snapshotter.js
+++ b/src/autoscaling/snapshotter.js
@@ -86,7 +86,7 @@ export default class Snapshotter {
*/
async start() {
// Ensure max memory is correctly computed.
- if (!this.maxMemoryBytes || Number.isNaN(this.maxMemoryBytes)) {
+ if (!this.maxMemoryBytes) {
const { totalBytes } = await getMemoryInfo();
if (isAtHome()) {
this.maxMemoryBytes = totalBytes;