christkv/node-mongodb-native — Issue #438: db.ensureIndex fails if not passed a callback
Author: johnoliverdriscoll
Created: 2011-12-13 06:39:23+00:00
State: open

db.ensureIndex doesn't check the callback passed before attempting to execute it. This will cause an error if the callback is omitted when calling db.ensureIndex

Line 628:
```javascript
return callback(null, index_name)
```

Patch
```javascript
return callback ? callback(null, index_name) : null
```