Skip to content

Commit 0591001

Browse files
committed
fix: safer read of DEBUG_PRINT_LIMIT
1 parent fdc12ec commit 0591001

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pretty-dom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function prettyDOM(dom, maxLength, options = {}) {
4747
}
4848
if (typeof maxLength !== 'number') {
4949
maxLength =
50-
(typeof process !== 'undefined' && process.env.DEBUG_PRINT_LIMIT) || 7000
50+
(typeof process !== 'undefined' && typeof process.env !== 'undefined' && process.env.DEBUG_PRINT_LIMIT) || 7000
5151
}
5252

5353
if (maxLength === 0) {

0 commit comments

Comments
 (0)