mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
logging: Guard against log color being undefined.
The 'info' log facility uses the default color, which is not present in `LEVEL_COLORS`, thus `undefined` and unable to be `slice`d. (As reported by @brucejo75). Refs: https://github.com/meteor/meteor/pull/8728#issuecomment-336324674 Refs: meteor/meteor#9170
This commit is contained in:
@@ -55,7 +55,7 @@ var META_COLOR = 'blue';
|
||||
// ops per second (on Node 8) by caching "process.platform".
|
||||
var isWin32 = typeof process === 'object' && process.platform === 'win32';
|
||||
var platformColor = function (color) {
|
||||
if (isWin32 && color.slice(-6) !== 'Bright') {
|
||||
if (isWin32 && typeof color === 'string' && color.slice(-6) !== 'Bright') {
|
||||
return color + 'Bright';
|
||||
}
|
||||
return color;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Logging facility.",
|
||||
version: '1.1.18'
|
||||
version: '1.1.19'
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
|
||||
Reference in New Issue
Block a user