Skip to content

Commit

Permalink
do proper checking
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbdavis committed Oct 8, 2014
1 parent 41e3d76 commit 4e7b827
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module.exports = function(url) {
jsonDoc[attr] = new Date(jsonDoc[attr]);
}
}
if (options.type === mongo.ObjectID) {
if (options.type === mongoskin.ObjectID) {
if ('string' === typeof jsonDoc[attr]) {
jsonDoc[attr] = db.id(jsonDoc[attr]);
}
Expand Down Expand Up @@ -150,7 +150,7 @@ module.exports = function(url) {
if (options.type === 'date' || options.type === Date) {
if ('string' === typeof changed[changedKey]) changed[changedKey] = new Date(changed[changedKey]);
}
if (options.type === mongo.ObjectID) {
if (options.type === mongoskin.ObjectID) {
if ('string' === typeof changed[changedKey]) changed[changedKey] = db.id(changed[changedKey]);
}
}
Expand Down

0 comments on commit 4e7b827

Please sign in to comment.