Skip to content

Commit 595529a

Browse files
committed
refactor: test string using IsNullOrWhiteSpace instead of length
1 parent c41e42a commit 595529a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ void AddSeparator() => AddLabel(new ListLabel
509509

510510
if (locomotiveStatus != null)
511511
{
512-
foreach (string data in locomotiveStatus.Split('\n').Where((string d) => d.Length > 1))
512+
foreach (string data in locomotiveStatus.Split('\n').Where((string d) => !string.IsNullOrWhiteSpace(d)))
513513
{
514514
string[] parts = data.Split(new string[] { " = " }, 2, StringSplitOptions.None);
515515
string keyPart = parts[0];

0 commit comments

Comments
 (0)