Ver Fonte

Refs #2378: fixed $group when no incoming docs

Kyle P Davis há 12 anos atrás
pai
commit
788885dcc7
1 ficheiros alterados com 1 adições e 1 exclusões
  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;
 	}