From 0e2f6e1413134fc1c199a5383389053b439547d7 Mon Sep 17 00:00:00 2001 From: "Bryan J. Ross" Date: Thu, 28 Jun 2018 10:16:31 -0600 Subject: [PATCH] change node detection in debugDOM Checks for the existence of the `process.versions.node` string. Not sure if there's a more concrete way, but this seems pretty explicit. --- src/queries.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/queries.js b/src/queries.js index 3795efa0..3b6f3aab 100644 --- a/src/queries.js +++ b/src/queries.js @@ -4,7 +4,7 @@ import {prettyDOM} from './pretty-dom' function debugDOM(htmlElement) { const limit = process.env.DEBUG_PRINT_LIMIT || 7000 - const inNode = typeof module !== 'undefined' && module.exports + const inNode = typeof process !== 'undefined' && process.versions !== undefined && process.versions.node !== undefined const inCypress = typeof window !== 'undefined' && window.Cypress /* istanbul ignore else */ if (inCypress) {