Skip to content

Commit 5f6ecfd

Browse files
committed
Add failsafe re balderdashy/sails#4395 and #22
1 parent 3366d83 commit 5f6ecfd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/configure.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ module.exports = function(overrides) {
154154
// Use the appropriate color for the log level.
155155
var colorMappings = _.isObject(options.colors) ? options.colors : {};
156156
var colorName = colorMappings[logAt];
157+
// Failsafe in case of troublesome configuration:
158+
if (colorName === undefined) {
159+
colorName = 'white';
160+
}
157161

158162
// Get the ANSI-colorized prefix.
159163
var colorizedPrefix = (function _getColorizedPrefix() {

0 commit comments

Comments
 (0)