Commit 5fb12e8
committed
🐛 (TfsTestPlansAndSuitesMigrationProcessor.cs): fix potential index out of range error by using FirstOrDefault
The change from accessing the first element of the testPlans list directly to using FirstOrDefault prevents a potential IndexOutOfRangeException. This ensures that if the list is empty, the testPlan variable will be set to null instead of causing an error, improving the robustness of the code.1 parent c4f3801 commit 5fb12e8
File tree
1 file changed
+1
-1
lines changed- src/MigrationTools.Clients.TfsObjectModel/Processors
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
618 | | - | |
| 618 | + | |
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
| |||
0 commit comments