-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.4.8
-
Component/s: None
-
Environment:nodejs v10
In rare situation when a connection may be null we get this stack
TypeError: Cannot call method 'isCompatible' of null
-
- [out :: ] at __executeInsertCommand (/home/codez/node_modules/harmony/node_modules/mongodb-mapper/node_modules/mongodb/lib/mongodb/db.js:1868:18)
https://github.com/mongodb/node-mongodb-native/blob/master/lib/mongodb/db.js#L1868
connection is check to be null later in the __executeInsertCommand function.
That check should move up.