Skip to content
This repository was archived by the owner on Dec 13, 2021. It is now read-only.

Commit 529618b

Browse files
committed
UmbracoProperty processor - removed an additional null reference check
Following the logic throughout Ditto, the TargetType would never be null, if it was, then there are bigger problems at play - and a null reference check would flag this immediately.
1 parent 158f127 commit 529618b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Our.Umbraco.Ditto/ComponentModel/Processors/UmbracoPropertyAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public override object ProcessValue()
9191
var altPropName = string.Empty;
9292

9393
// Check for Umbraco properties attribute on class
94-
if (this.Context.TargetType != null && Ditto.TryGetTypeAttribute(this.Context.TargetType, out UmbracoPropertiesAttribute classAttr))
94+
if (Ditto.TryGetTypeAttribute(this.Context.TargetType, out UmbracoPropertiesAttribute classAttr))
9595
{
9696
// Apply the prefix
9797
if (string.IsNullOrWhiteSpace(classAttr.Prefix) == false)

0 commit comments

Comments
 (0)