Skip to content

Commit

Permalink
check for db.db as db.db.approximateSize not exposed with multilevel
Browse files Browse the repository at this point in the history
  • Loading branch information
staticskies committed Oct 25, 2015
1 parent 32c5b6e commit c4a4ac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/queryplanner.js
Expand Up @@ -48,7 +48,7 @@ function queryplanner(db, options) {
var newq = queryMask(q)
, range = utilities.createQuery(newq);

if (db.db.approximateSize) {
if (db.db && db.db.approximateSize) {
db.db.approximateSize(range.start, range.end, function(err, size) {
if (err) {
size = Object.keys(variablesMask(q)).length;
Expand Down

0 comments on commit c4a4ac3

Please sign in to comment.