diff --git a/src/pretty-dom.js b/src/pretty-dom.js index 9f065c03..9bfe0a58 100644 --- a/src/pretty-dom.js +++ b/src/pretty-dom.js @@ -16,7 +16,9 @@ const inNode = () => process.versions.node !== undefined const getMaxLength = dom => - inCypress(dom) ? 0 : process.env.DEBUG_PRINT_LIMIT || 7000 + inCypress(dom) + ? 0 + : typeof process !== 'undefined' && process.env.DEBUG_PRINT_LIMIT || 7000 const {DOMElement, DOMCollection} = prettyFormat.plugins