diff --git a/src/helpers/classList.js b/src/helpers/classList.js index c4da5b0e..f2ce09d2 100644 --- a/src/helpers/classList.js +++ b/src/helpers/classList.js @@ -25,30 +25,30 @@ export function resetState() { /* istanbul ignore next */ export function log() { - if (process.env.NODE_ENV === "production") return; + if (process.env.NODE_ENV !== "production") { + let classes = document.getElementsByTagName("html")[0].className; + let buffer = "Show tracked classes:\n\n"; - let classes = document.getElementsByTagName("html")[0].className; - let buffer = "Show tracked classes:\n\n"; + buffer += ` (${classes}): + `; + for (let x in htmlClassList) { + buffer += ` ${x} ${htmlClassList[x]} + `; + } - buffer += ` (${classes}): -`; - for (let x in htmlClassList) { - buffer += ` ${x} ${htmlClassList[x]} -`; - } - - classes = document.body.className; + classes = document.body.className; - buffer += `\n\ndoc.body (${classes}): -`; - for (let x in docBodyClassList) { - buffer += ` ${x} ${docBodyClassList[x]} -`; - } + buffer += `\n\ndoc.body (${classes}): + `; + for (let x in docBodyClassList) { + buffer += ` ${x} ${docBodyClassList[x]} + `; + } - buffer += "\n"; + buffer += "\n"; - console.log(buffer); + console.log(buffer); + } } /* eslint-enable no-console */