Skip to content

Commit

Permalink
fix(module: form): null reference exception (#3815)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderJames committed Apr 23, 2024
1 parent 88f6b90 commit b654223
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/form/FormItem.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{
<label class=@GetLabelClass() style="@LabelStyle">
@Label
@if (Form.RequiredMark == FormRequiredMark.Optional && !IsRequired)
@if (Form?.RequiredMark == FormRequiredMark.Optional && !IsRequired)
{
<span class="ant-form-item-optional">@_locale.Optional</span>
}
Expand Down
2 changes: 1 addition & 1 deletion components/form/FormItem.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public FormValidateStatus ValidateStatus

private ClassMapper _labelClassMapper = new ClassMapper();

private AntLabelAlignType? FormLabelAlign => LabelAlign ?? Form.LabelAlign;
private AntLabelAlignType? FormLabelAlign => LabelAlign ?? Form?.LabelAlign;

private FieldIdentifier _fieldIdentifier;
private Func<object, object> _fieldValueGetter;
Expand Down

0 comments on commit b654223

Please sign in to comment.