Skip to content

Commit

Permalink
Wrap NODE_ENV conditional code in block
Browse files Browse the repository at this point in the history
  • Loading branch information
vlazh authored and diasbruno committed Oct 28, 2021
1 parent f5d404c commit 5eccdb0
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/helpers/classList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 += `<html /> (${classes}):
`;
for (let x in htmlClassList) {
buffer += ` ${x} ${htmlClassList[x]}
`;
}

buffer += `<html /> (${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 */

Expand Down

0 comments on commit 5eccdb0

Please sign in to comment.