File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Umbraco.Core/PropertyEditors Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public virtual bool IsConverter(IPublishedPropertyType propertyType)
1818 case PropertyValueLevel . Source :
1919 // the default implementation uses the old magic null & string comparisons,
2020 // other implementations may be more clever, and/or test the final converted object values
21- return value != null && ( ! ( value is string ) || string . IsNullOrWhiteSpace ( ( string ) value ) == false ) ;
21+ return value != null && ( ! ( value is string stringValue ) || ! string . IsNullOrWhiteSpace ( stringValue ) ) ;
2222 case PropertyValueLevel . Inter :
2323 return null ;
2424 case PropertyValueLevel . Object :
@@ -32,7 +32,7 @@ public virtual bool IsConverter(IPublishedPropertyType propertyType)
3232 public virtual bool HasValue ( IPublishedProperty property , string culture , string segment )
3333 {
3434 var value = property . GetSourceValue ( culture , segment ) ;
35- return value != null && ( ! ( value is string ) || string . IsNullOrWhiteSpace ( ( string ) value ) == false ) ;
35+ return value != null && ( ! ( value is string stringValue ) || ! string . IsNullOrWhiteSpace ( stringValue ) ) ;
3636 }
3737
3838 public virtual Type GetPropertyValueType ( IPublishedPropertyType propertyType )
You can’t perform that action at this time.
0 commit comments