Fix exception when generating MongoDB projection from query
This commit is contained in:
1 parent
b01f3d394e
commit
6e9bf5a027
1 file changed
+1
-1
+1
-1
@@ -166,7 +166,7 @@ queryProjection = (query, proj) ->
|
|||||||
for k,v of query
|
for k,v of query
|
||||||
if k.charAt(0) == '$' # this is a logical operator
|
if k.charAt(0) == '$' # this is a logical operator
|
||||||
for q in v
|
for q in v
|
||||||
projection(q, proj)
|
queryProjection(q, proj)
|
||||||
else
|
else
|
||||||
proj[k] = 1
|
proj[k] = 1
|
||||||
return proj
|
return proj
|
||||||
|
|||||||
Reference in new issue
Block a user