Skip to content

Commit 17dc2af

Browse files
author
Yanlong Wang
committed
Check init condition
1 parent 77ea6d8 commit 17dc2af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongoosastic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = function Mongoosastic(schema, options) {
3030
esClient = createEsClient(options);
3131
}
3232

33-
if (identifyingPaths.length) {
33+
if (identifyingPaths && identifyingPaths.length) {
3434
identifyingPaths.push('_id');
3535
identifyingPaths = _.uniq(identifyingPaths);
3636
} else {

0 commit comments

Comments
 (0)