summaryrefslogtreecommitdiff
path: root/jstests/core/arrayfind8.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/arrayfind8.js')
-rw-r--r--jstests/core/arrayfind8.js12
1 files changed, 3 insertions, 9 deletions
diff --git a/jstests/core/arrayfind8.js b/jstests/core/arrayfind8.js
index d322229a298..a687351b554 100644
--- a/jstests/core/arrayfind8.js
+++ b/jstests/core/arrayfind8.js
@@ -77,20 +77,14 @@ function checkQuery(subQuery, bothMatch, elemMatch, nonElemMatch, additionalCons
// Construct standard and elemMatch queries from subQuery.
firstSubQueryKey = Object.keySet(subQuery)[0];
if (firstSubQueryKey[0] == '$') {
- standardQuery = {
- $and: [{a: subQuery}, additionalConstraints]
- };
+ standardQuery = {$and: [{a: subQuery}, additionalConstraints]};
} else {
// If the subQuery contains a field rather than operators, append to the 'a' field.
modifiedSubQuery = {};
modifiedSubQuery['a.' + firstSubQueryKey] = subQuery[firstSubQueryKey];
- standardQuery = {
- $and: [modifiedSubQuery, additionalConstraints]
- };
+ standardQuery = {$and: [modifiedSubQuery, additionalConstraints]};
}
- elemMatchQuery = {
- $and: [{a: {$elemMatch: subQuery}}, additionalConstraints]
- };
+ elemMatchQuery = {$and: [{a: {$elemMatch: subQuery}}, additionalConstraints]};
debug(elemMatchQuery);
function maySave(aValue) {