Skip to content

Commit 74db836

Browse files
committed
Fix In for single item. Breaks UseIndex though
1 parent 28dc310 commit 74db836

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/CouchDB.Driver/Translators/ConstantExpressionTranslator.cs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,9 @@ protected override Expression VisitConstant(ConstantExpression c)
8484

8585
private void VisitIEnumerable<T>(IList<T> list)
8686
{
87-
if (list.Count < 1)
88-
{
89-
return;
90-
}
91-
if (list.Count == 1)
92-
{
93-
_sb.Append(VisitConst(list[0]));
94-
}
95-
else
96-
{
97-
_sb.Append("[");
98-
_sb.Append(string.Join(",", list.Select(e => VisitConst(e))));
99-
_sb.Append("]");
100-
}
87+
_sb.Append("[");
88+
_sb.Append(string.Join(",", list.Select(e => VisitConst(e))));
89+
_sb.Append("]");
10190

10291
string VisitConst(object o)
10392
{

0 commit comments

Comments
 (0)