From 220a595147db0ac4d415983c148c551b356e0e4c Mon Sep 17 00:00:00 2001 From: Kristian Hellang Date: Tue, 17 Oct 2023 23:02:40 +0200 Subject: [PATCH] Normalize empty string to null --- src/Hangfire.Console/Progress/DefaultProgressBar.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }