diff --git a/lib/configure.js b/lib/configure.js index d50d962..c85a4de 100644 --- a/lib/configure.js +++ b/lib/configure.js @@ -154,6 +154,10 @@ module.exports = function(overrides) { // Use the appropriate color for the log level. var colorMappings = _.isObject(options.colors) ? options.colors : {}; var colorName = colorMappings[logAt]; + // Failsafe in case of troublesome configuration: + if (colorName === undefined) { + colorName = 'white'; + } // Get the ANSI-colorized prefix. var colorizedPrefix = (function _getColorizedPrefix() {