From 2c439613a792ea747837b326648411efb998a1d4 Mon Sep 17 00:00:00 2001 From: Gaurav Chadha <65453826+Chadha93@users.noreply.github.com> Date: Tue, 2 Dec 2025 23:10:01 +0530 Subject: [PATCH] Update apps/playwright-service-ts/api.ts Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --- apps/playwright-service-ts/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/playwright-service-ts/api.ts b/apps/playwright-service-ts/api.ts index ce8b6c9d2..21f117687 100644 --- a/apps/playwright-service-ts/api.ts +++ b/apps/playwright-service-ts/api.ts @@ -13,7 +13,7 @@ const port = process.env.PORT || 3003; app.use(bodyParser.json()); const BLOCK_MEDIA = (process.env.BLOCK_MEDIA || 'False').toUpperCase() === 'TRUE'; -const MAX_CONCURRENT_PAGES = parseInt(process.env.MAX_CONCURRENT_PAGES || '10'); +const MAX_CONCURRENT_PAGES = Math.max(1, Number.parseInt(process.env.MAX_CONCURRENT_PAGES ?? '10', 10) || 10); const PROXY_SERVER = process.env.PROXY_SERVER || null; const PROXY_USERNAME = process.env.PROXY_USERNAME || null;