Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
*Location*: https://docs.mongodb.com/v3.2/reference/method/db.dropDatabase/
*User-Agent*: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
*Referrer*: https://www.google.ru/
*Screen Resolution*: 1600 x 900
Description
there is a mistake when calling this function:
if(self.s.topology.capabilities().commandsTakeWriteConcern) {
^
TypeError: Cannot read property 'commandsTakeWriteConcern' of null
at decorateWithWriteConcern (C:\projects\node\chat2\node_modules\mongoose\node_modules\mongodb\lib\db.js:485:36)
at Db.dropDatabase (C:\projects\node\chat2\node_modules\mongoose\node_modules\mongodb\lib\db.js:872:3)
at Object.<anonymous> (C:\projects\node\chat2\createDb.js:6:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
in version 4.6.0 and higher