Skip to content

Commit

Permalink
fix: don't throw exception if node is null
Browse files Browse the repository at this point in the history
  • Loading branch information
melflitty-aneo committed Jul 31, 2023
1 parent 13a3683 commit a43f510
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Common/src/gRPC/ExpressionExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,9 @@ public ReplaceExpressionVisitor(Expression oldValue,
newValue_ = newValue;
}

public override Expression Visit(Expression? node)
{
if (node == null)
{
throw new ArgumentNullException(nameof(node));
}

return node == oldValue_
? newValue_
: base.Visit(node);
}
public override Expression Visit(Expression node)
=> node == oldValue_
? newValue_
: base.Visit(node);
}
}

0 comments on commit a43f510

Please sign in to comment.