You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My feel is that null should translate to an empty string, I've encountered lots of cases where null is used interchangeably with string.Empty. I'm happy with a performance hit but it could be implemented like:
=> {
var value = property.GetValue(data, null);
return value == null ? string.Empty : value.ToString();
}
It should translate to an empty string.
Changing up the ReplaceTemplateField to accept an object instead of a string and then doing the null check in there also fixes for fields and ExpandoObjects and whatever else to come
Two Options
1. Better Error Message
2. Swallow the nulls
Thoughts?
Feels like this kind of decision is best left to the person in charge of the code base. Which way feels more true to the vision?
As it currently stands it simply gives an error message that says "Object reference not set to an instance of an object."
The text was updated successfully, but these errors were encountered: