Skip to content

Commit

Permalink
#76 - Fixed incorrect null propagation on the rhs of a `pipe-expres…
Browse files Browse the repository at this point in the history
…sion`. (#77)
  • Loading branch information
springcomp authored Oct 20, 2022
1 parent 4a26941 commit 30f6e4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/jmespath.net/Expressions/JmesPathPipeExpression.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json.Linq;
using DevLab.JmesPath.Utils;
using Newtonsoft.Json.Linq;

namespace DevLab.JmesPath.Expressions
{
Expand Down Expand Up @@ -28,7 +29,7 @@ protected override JmesPathArgument Transform(JToken json)
.AsJToken()
;

return Right.Transform(token);
return JTokens.IsNull(token) ? token : Right.Transform(token);
}

public override string ToString()
Expand Down

0 comments on commit 30f6e4e

Please sign in to comment.