Fixed problem with Drop and Conditionals.

This commit is contained in:
Eric Fontana
2014-09-11 07:55:34 -04:00
parent d56017e3f5
commit 0f51312081

View File

@@ -40,12 +40,21 @@ namespace TimberWinR.Parser
if (json_type != null && json_type.ToString() != Type)
return true; // Filter does not apply.
}
if (Condition != null && !EvaluateCondition(json, Condition))
return false;
if (Matches(json))
{
if (Condition != null)
{
var expr = EvaluateCondition(json, Condition);
if (expr)
{
if (DropIfMatch)
return false; // drop this one
}
else
return false;
}
if (DropIfMatch)
return false;