Skip to content

Commit

Permalink
Add failsafe re balderdashy/sails#4395 and #22
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Jun 25, 2018
1 parent 3366d83 commit 5f6ecfd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 5f6ecfd

Please sign in to comment.