Skip to content

Commit

Permalink
fix from lint
Browse files Browse the repository at this point in the history
  • Loading branch information
chaowlert committed Nov 22, 2020
1 parent 7140572 commit bd353d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ dotnet_diagnostic.S3358.severity = suggestion

# S125: Sections of code should not be commented out
dotnet_diagnostic.S125.severity = suggestion

# RCS1146: Use conditional access.
dotnet_diagnostic.RCS1146.severity = suggestion
6 changes: 3 additions & 3 deletions src/Mapster/Adapters/BaseAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ private static Expression CreateAdaptExpressionCore(Expression source, Type dest
if (destination != null)
paramList.Add(destination);
paramList.AddRange(lambda.Parameters.Skip(paramList.Count));
if (!lambda.IsMultiLine())
return lambda.Apply(arg.MapType, paramList.ToArray());
return Expression.Invoke(lambda, paramList.ToArray());
return lambda.IsMultiLine()
? Expression.Invoke(lambda, paramList.ToArray())
: lambda.Apply(arg.MapType, paramList.ToArray());
}
finally
{
Expand Down

0 comments on commit bd353d4

Please sign in to comment.