Skip to content

Commit 0d33ce5

Browse files
committed
Merge branch '6.x' into vkarpov15/gh-14022
2 parents c7a9eb6 + cc75c7b commit 0d33ce5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/model.populate.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11017,8 +11017,10 @@ describe('model: populate:', function() {
1101711017
const peopleList = await Person.find().
1101811018
sort({ firstName: 1 }).
1101911019
populate({ path: 'nationality', match: { desc: 'Spain' } });
11020-
assert.deepStrictEqual(peopleList.map(p => p.nationality?.key), [undefined, 'ES', undefined]);
11021-
11020+
assert.deepStrictEqual(peopleList.map(
11021+
p => p.nationality ? p.nationality.key : undefined),
11022+
[undefined, 'ES', undefined]
11023+
);
1102211024
});
1102311025

1102411026

0 commit comments

Comments
 (0)