forked from cncf/landscapeapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
puppeteer.patch
28 lines (28 loc) · 1 KB
/
puppeteer.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/lib/cjs/environment.js b/lib/cjs/environment.js
index 44b5a8ed00ecdc52de706a5ddc7897b125513b5e..497ab69abbe98dbd03f103bc6ddaac039c0b6f0b 100644
--- a/lib/cjs/environment.js
+++ b/lib/cjs/environment.js
@@ -16,4 +16,8 @@
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNode = void 0;
-exports.isNode = typeof document === 'undefined';
+exports.isNode = !!(
+ typeof process !== 'undefined' &&
+ process.versions &&
+ process.versions.node
+);
diff --git a/lib/esm/environment.js b/lib/esm/environment.js
index 6c664898c2b822e84a2444d51be4f9d95cf16b47..1d9a4976c9d584036c130c4a604b13020b22c794 100644
--- a/lib/esm/environment.js
+++ b/lib/esm/environment.js
@@ -13,4 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-export const isNode = typeof document === 'undefined';
+export const isNode = export const isNode = !!(
+ typeof process !== 'undefined' &&
+ process.versions &&
+ process.versions.node
+);