From 55f99e65bbc76d583238171c8cd4848162b2cb0b Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Wed, 21 Sep 2022 16:05:46 +0300 Subject: [PATCH] fix(scully-plugin-puppeteer): correctly track requests in bare project (#1610) Previously, instead of adding/removing each request from the `requests` set, the set itself was added/removed. Since `Set` deduplicates its values, it would always contain just one item (regardless of how many requests would be pending) and it would be emptied once the first request was completed. This commit fixes this by adding/removing the actual request to/from the `requests` set. --- .../src/lib/plugins-scully-plugin-puppeteer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/plugins/scully-plugin-puppeteer/src/lib/plugins-scully-plugin-puppeteer.ts b/libs/plugins/scully-plugin-puppeteer/src/lib/plugins-scully-plugin-puppeteer.ts index 489c7ccaf..036fa880a 100644 --- a/libs/plugins/scully-plugin-puppeteer/src/lib/plugins-scully-plugin-puppeteer.ts +++ b/libs/plugins/scully-plugin-puppeteer/src/lib/plugins-scully-plugin-puppeteer.ts @@ -57,13 +57,13 @@ export const puppeteerRender = async (route: HandledRoute): Promise => { // eslint-disable-next-line no-inner-declarations function registerRequest(request) { request.continue(); - requests.add(requests); + requests.add(request); } // eslint-disable-next-line no-inner-declarations function unRegisterRequest(request) { // request.continue(); - requests.delete(requests); + requests.delete(request); } pageLoaded