Permalink
Browse files

Add fix thanks to @dvv

Change-Id: Ic608bade4f3c02e3e45a0670c770ef01e834d881
  • Loading branch information...
1 parent 5bcca0a commit c06749e366004dc2a9072800af24e38a29bc2352 Tim Caswell committed Jul 8, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 query.js
View
@@ -17,6 +17,7 @@ module.exports = function QueryPlugin() {
}
var keys = Object.keys(this.index);
var counter = keys.length;
+ if (!counter) return callback(null, []);
if(keys.length === 0) {
process.nextTick(function() {
if (stream) stream.emit('end');

0 comments on commit c06749e

Please sign in to comment.