From 8f97c15f71272857df70d7a4e77125b6d81fbe18 Mon Sep 17 00:00:00 2001 From: Aaron Heckmann Date: Mon, 4 Jun 2012 08:13:45 -0700 Subject: [PATCH] fixed; isCapped when doc is null --- lib/mongodb/collection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongodb/collection.js b/lib/mongodb/collection.js index 33394d4811b..210f563beba 100644 --- a/lib/mongodb/collection.js +++ b/lib/mongodb/collection.js @@ -1293,7 +1293,7 @@ Collection.prototype.isCapped = function isCapped(callback) { if(err != null) { callback(err); } else { - callback(null, document.capped); + callback(null, document && document.capped); } }); };