Explorar o código

Refs #2378: fixed $group when no incoming docs

Kyle P Davis %!s(int64=13) %!d(string=hai) anos
pai
achega
788885dcc7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
 	}