Skip to content

Commit

Permalink
Null reference check
Browse files Browse the repository at this point in the history
  • Loading branch information
Timm Bremus committed Sep 24, 2018
1 parent 2f6ff22 commit 9866426
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static ModelExpression GetModelExpression(this FormTagHelperBase tagHelpe
public static object GetModelValue(this FormTagHelperBase tagHelper, TagHelperContext context)
{
var modelExpression = GetModelExpression(tagHelper, context);
return modelExpression.Model;
return modelExpression?.Model;
}

/// <summary>
Expand Down

0 comments on commit 9866426

Please sign in to comment.