grover 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afca67d672e63071ee66a65dc2d2a65e728eb06715b2c59b43cf44dce587ab1c
4
- data.tar.gz: 50313e3201d5f1bbbf8e6d9c92147c3ddc373fbdd51145ee3315a616b69b303c
3
+ metadata.gz: a7b3b3f08cd1bc34a419001834c4e598b0f1de7ef0f000feb5d65c3ef530c954
4
+ data.tar.gz: 4a92e62a4b3170aeded26631ea181fe9712f0bcaa483c38d168955875d09c955
5
5
  SHA512:
6
- metadata.gz: f8aa164f8b52ef008c70fe7ff4918194859db0be10cee102556cc67d49fe9cf5035ee181f9dac64dce87dfa7b7295effe090b851504dd9774e33a23ecab7e15e
7
- data.tar.gz: cd5b46accc2bbbdc5f3d149d62099c4d47c36744aa877876966680e687bfa0fc69f9ad6045c0a4b9a1e3f135c90279ffd595d526f373daddda02a5fb42db754d
6
+ metadata.gz: 8e232bf24b7094446e23cd4d3f5e7088593bdb3510d9b1589ae0f4148a4dc0bc82121542a597877eeb0b73280a1f867741c96e86b7af040cf1405c93b60fe22d
7
+ data.tar.gz: fd7f4107b126fec4fde6eee2be864c52536669f80ab8ae8719fa1025fb2dc4dd251cf89a4835aa5ef4e6118ea4e7bbc072661c54f306e80ae3ec8fa30506ef6f
@@ -145,11 +145,15 @@ const _processPage = (async (convertAction, urlOrHtml, options) => {
145
145
  // Request is some HTML content. Use request interception to assign the body
146
146
  requestOptions.waitUntil = waitUntil || 'networkidle0';
147
147
  await page.setRequestInterception(true);
148
- page.once('request', request => {
149
- request.respond({ body: urlOrHtml === '' ? ' ' : urlOrHtml });
150
- // Reset the request interception
151
- // (we only want to intercept the first request - ie our HTML)
152
- page.on('request', request => request.continue());
148
+ let htmlIntercepted = false;
149
+ page.on('request', request => {
150
+ // We only want to intercept the first request - ie our HTML
151
+ if (htmlIntercepted)
152
+ request.continue();
153
+ else {
154
+ htmlIntercepted = true
155
+ request.respond({ body: urlOrHtml === '' ? ' ' : urlOrHtml });
156
+ }
153
157
  });
154
158
  const displayUrl = options.displayUrl; delete options.displayUrl;
155
159
  await page.goto(displayUrl || 'http://example.com', requestOptions);
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Grover
4
- VERSION = '1.0.2'
4
+ VERSION = '1.0.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bromwich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-21 00:00:00.000000000 Z
11
+ date: 2021-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: combine_pdf