Skip to content

Commit

Permalink
fix(scully-plugin-puppeteer): correctly track requests in bare project (
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
gkalpak authored Sep 21, 2022
1 parent 7463e05 commit 55f99e6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ export const puppeteerRender = async (route: HandledRoute): Promise<string> => {
// 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
Expand Down

0 comments on commit 55f99e6

Please sign in to comment.