Skip to content

Commit 853896a

Browse files
committed
#2026 Trim the start space if first letter is upper case (CommonHelper.ConvertEnum)
1 parent d2925c3 commit 853896a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Libraries/Nop.Core/CommonHelper.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ public static string ConvertEnum(string str)
302302
result += " " + c.ToString();
303303
else
304304
result += c.ToString();
305+
306+
//ensure no spaces (e.g. when the first letter is upper case)
307+
result = result.TrimStart();
305308
return result;
306309
}
307310

0 commit comments

Comments
 (0)