diff --git a/lib/colors.js b/lib/colors.js index 790ffd4..dc68fdb 100644 --- a/lib/colors.js +++ b/lib/colors.js @@ -36,10 +36,10 @@ colors.themes = {}; var ansiStyles = colors.styles = require('./styles'); var defineProps = Object.defineProperties; -colors.supportsColor = require('./system/supports-colors'); +colors.supportsColor = require('./system/supports-colors').supportsColor; if (typeof colors.enabled === "undefined") { - colors.enabled = colors.supportsColor; + colors.enabled = colors.supportsColor() !== false; } colors.stripColors = colors.strip = function(str){ @@ -184,4 +184,4 @@ for (var map in colors.maps) { })(map) } -defineProps(colors, init()); \ No newline at end of file +defineProps(colors, init());