From 3602563a9116820bbf5c92da1cf92cc5e41cc9dd Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Thu, 17 Oct 2024 08:33:06 +0700 Subject: [PATCH] Fix bug with too-long substrings --- src/LfMerge.Core/Reporting/ConversionError.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/LfMerge.Core/Reporting/ConversionError.cs b/src/LfMerge.Core/Reporting/ConversionError.cs index da6607a3..4c64b4cb 100644 --- a/src/LfMerge.Core/Reporting/ConversionError.cs +++ b/src/LfMerge.Core/Reporting/ConversionError.cs @@ -118,7 +118,8 @@ public string MongoId() { } public string Label() { - if (Comment == null || Comment.Content == null) return string.Empty; + if (Comment == null || String.IsNullOrEmpty(Comment.Content)) return string.Empty; + if (Comment.Content.Length < 100) return Comment.Content; return Comment.Content.Substring(0, 100); } }