We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38ece1e commit 1f00bb3Copy full SHA for 1f00bb3
src/CouchDB.Driver/Query/QueryOptimizer.cs
@@ -105,9 +105,13 @@ protected override Expression VisitMethodCall(MethodCallExpression node)
105
106
while (_nextWhereCalls.Count > 0)
107
{
108
- Expression nextWhereBody = _nextWhereCalls.Dequeue().GetLambdaBody();
109
- conditionExpression = Expression.AndAlso(nextWhereBody, conditionExpression);
110
- conditionExpression = Visit(conditionExpression);
+ var call = _nextWhereCalls.Dequeue();
+ if (call != null)
+ {
111
+ Expression nextWhereBody = call.GetLambdaBody();
112
+ conditionExpression = Expression.AndAlso(nextWhereBody, conditionExpression);
113
+ conditionExpression = Visit(conditionExpression);
114
+ }
115
}
116
117
if (conditionExpression.IsBoolean())
0 commit comments