Permalink
Browse files

Only return collection after ensuring the TTL index

  • Loading branch information...
aroman committed Dec 17, 2012
1 parent 0ccfb74 commit 64ccda5024043bec5b13f0062c5186863605271c
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/connect-mongo.js
View
@@ -129,9 +129,10 @@ module.exports = function(connect) {
if (err) {
throw new Error('Error setting TTL index on collection : ' + self.db_collection_name);
}
+
+ callback && callback(self.collection);
});
- callback && callback(self.collection);
}
});
}

0 comments on commit 64ccda5

Please sign in to comment.