diff options
Diffstat (limited to 'src/mongo/shell/utils_sh.js')
-rw-r--r-- | src/mongo/shell/utils_sh.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/shell/utils_sh.js b/src/mongo/shell/utils_sh.js index fc7574c5cb1..a64292a6004 100644 --- a/src/mongo/shell/utils_sh.js +++ b/src/mongo/shell/utils_sh.js @@ -331,7 +331,7 @@ sh.awaitCollectionBalance = function(coll, timeout, interval) { {'$group': {'_id': null, 'totalNumOrphanDocs': {'$sum': '$storageStats.numOrphanDocs'}}} ]; - var oldDb = db; + var oldDb = (typeof (db) === 'undefined' ? undefined : db); try { db = coll.getDB(); |