Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
freever committed Nov 14, 2023
1 parent 4999101 commit 7f1876e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ private void BindableObject_PropertyChanged(object sender, PropertyChangedEventA
var property = _propertyFunc.Invoke((TBindableObject)sender);
#if !NETSTANDARD2_0
string serializedProperty = JsonSerializer.Serialize(property);
object? copiedProperty = JsonSerializer.Deserialize(serializedProperty, typeof(TProperty));
object? copiedProperty = null;
try
{
copiedProperty = JsonSerializer.Deserialize(serializedProperty, typeof(TProperty));
}
catch (Exception)
{
//do nothing
}
if (copiedProperty != null)
{
Add((TProperty)copiedProperty);
Expand Down

0 comments on commit 7f1876e

Please sign in to comment.