diff --git a/src/Hangfire.Console/Progress/DefaultProgressBar.cs b/src/Hangfire.Console/Progress/DefaultProgressBar.cs index cd8b0f2..0ddffc9 100644 --- a/src/Hangfire.Console/Progress/DefaultProgressBar.cs +++ b/src/Hangfire.Console/Progress/DefaultProgressBar.cs @@ -29,8 +29,8 @@ internal DefaultProgressBar(ConsoleContext context, string progressBarId, string _context = context ?? throw new ArgumentNullException(nameof(context)); _progressBarId = progressBarId; - _name = name; - _color = color; + _name = string.IsNullOrEmpty(name) ? null : name; + _color = string.IsNullOrEmpty(color) ? null : color; _value = -1; }