Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/@babel/highlight/lib/index.js')
-rw-r--r--tools/node_modules/eslint/node_modules/@babel/highlight/lib/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/node_modules/eslint/node_modules/@babel/highlight/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/highlight/lib/index.js
index b8537b26f6b..d323b399c41 100644
--- a/tools/node_modules/eslint/node_modules/@babel/highlight/lib/index.js
+++ b/tools/node_modules/eslint/node_modules/@babel/highlight/lib/index.js
@@ -106,7 +106,7 @@ function getChalk(options) {
}
function highlight(code, options = {}) {
- if (shouldHighlight(options)) {
+ if (code !== "" && shouldHighlight(options)) {
const chalk = getChalk(options);
const defs = getDefs(chalk);
return highlightTokens(defs, code);