Skip to content

Commit 70d90c1

Browse files
rossipediaKent C. Dodds
authored and
Kent C. Dodds
committed
fix: change node detection in debugDOM (#64)
Checks for the existence of the `process.versions.node` string. Not sure if there's a more concrete way, but this seems pretty explicit.
1 parent ba44c14 commit 70d90c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/queries.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {prettyDOM} from './pretty-dom'
44

55
function debugDOM(htmlElement) {
66
const limit = process.env.DEBUG_PRINT_LIMIT || 7000
7-
const inNode = typeof module !== 'undefined' && module.exports
7+
const inNode = typeof process !== 'undefined' && process.versions !== undefined && process.versions.node !== undefined
88
const inCypress = typeof window !== 'undefined' && window.Cypress
99
/* istanbul ignore else */
1010
if (inCypress) {

0 commit comments

Comments
 (0)