Skip to content

Commit

Permalink
Directly accesses the last element of the Segments
Browse files Browse the repository at this point in the history
  • Loading branch information
JBrenesSimpat committed Jul 23, 2024
1 parent b0e5e01 commit 7ba2f3a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ IEnumerable<EqualityConstraint> equalityConstraints
.Select(x => $"'{x}'")
.ToArray()
);
string targetSegment = targetPath.Segments[targetPath.Segments.Length - 1].ToString().TrimStart('.');
string targetSegment = targetPath.Segments[^1].ToString().TrimStart('.');
errors.Add(
$"All values supplied for '{targetSegment}' must match."
+ " Review all references (including those higher up in the resource's data)"
Expand Down

0 comments on commit 7ba2f3a

Please sign in to comment.