Browse Source

Refs #2378: fixed $group when no incoming docs

Kyle P Davis 12 years ago
parent
commit
788885dcc7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/pipeline/documentSources/GroupDocumentSource.js

+ 1 - 1
lib/pipeline/documentSources/GroupDocumentSource.js

@@ -173,7 +173,7 @@ proto.advance = function advance() {
 	//verify(this.currentGroupsKeysIndex < this.groupsKeys.length);
 
 	++this.currentGroupsKeysIndex;
-	if (this.currentGroupsKeysIndex === this.groupsKeys.length) {
+	if (this.currentGroupsKeysIndex >= this.groupsKeys.length) {
 		this.currentDocument = null;
 		return false;
 	}