Browse Source

fixed possible null pointer

saintedlama/travis-non-legacy
Mathias Buus 14 years ago
parent
commit
3a406615ff
  1. 2
      index.js

2
index.js

@ -10,7 +10,7 @@ var normalizeId = function() {
};
}
return function(args) {
if (typeof args[0] === 'object' && typeof args[0]._id === 'string') {
if (args[0] && typeof args[0] === 'object' && typeof args[0]._id === 'string') {
args[0]._id = new mongo.BSONNative.ObjectID(args[0]._id);
}
return args;

Loading…
Cancel
Save