summaryrefslogtreecommitdiff
path: root/src/mongo/bson/bsonobj.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/bson/bsonobj.cpp')
-rw-r--r--src/mongo/bson/bsonobj.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/bson/bsonobj.cpp b/src/mongo/bson/bsonobj.cpp
index 57bbd59969b..7b5439cd40a 100644
--- a/src/mongo/bson/bsonobj.cpp
+++ b/src/mongo/bson/bsonobj.cpp
@@ -387,8 +387,8 @@ Status BSONObj::storageValidEmbedded() const {
if (name.startsWith("$")) {
if (first &&
// $ref is a collection name and must be a String
- (name == "$ref") &&
- e.type() == String && (i.next().fieldNameStringData() == "$id")) {
+ (name == "$ref") && e.type() == String &&
+ (i.next().fieldNameStringData() == "$id")) {
first = false;
// keep inspecting fields for optional "$db"
e = i.next();