Skip to content

Commit

Permalink
Reverse order of if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Oct 18, 2023
1 parent 135893f commit 27f9171
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Source/Blazorise/Components/Validation/ValidationError.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
@if ( ParentValidation?.Status == ValidationStatus.Error )
{
<div id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
@if ( ChildContent is null && ErrorMessages != null && ErrorMessages.Any() )
@if ( ChildContent is not null )
{
@ChildContent
}
else if ( ErrorMessages != null && ErrorMessages.Any() )
{
@if ( Multiline )
{
Expand All @@ -19,9 +23,5 @@
@string.Join(";", ErrorMessages)
}
}
else
{
@ChildContent
}
</div>
}

0 comments on commit 27f9171

Please sign in to comment.