From c7a498917c688d13d00b7879e6e170b019e9aa1b Mon Sep 17 00:00:00 2001 From: Will Chen <241208185@qq.com> Date: Wed, 8 Nov 2017 10:31:06 -0600 Subject: [PATCH] supportsColor.level => supportsColor.stdout.level you wrote wrong console.log(supportsColor.level) undefined console.log(supportsColor.stdout.level >= 2) true --- src/node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.js b/src/node.js index b32d831a..7b92780f 100644 --- a/src/node.js +++ b/src/node.js @@ -24,7 +24,7 @@ exports.colors = [ 6, 2, 3, 4, 5, 1 ]; try { var supportsColor = require('supports-color'); - if (supportsColor && supportsColor.level >= 2) { + if (supportsColor && supportsColor.stdout.level >= 2) { exports.colors = [ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,