浏览代码

Refs #2378: fixed $group when no incoming docs

Kyle P Davis 12 年之前
父节点
当前提交
788885dcc7
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);
 	//verify(this.currentGroupsKeysIndex < this.groupsKeys.length);
 
 
 	++this.currentGroupsKeysIndex;
 	++this.currentGroupsKeysIndex;
-	if (this.currentGroupsKeysIndex === this.groupsKeys.length) {
+	if (this.currentGroupsKeysIndex >= this.groupsKeys.length) {
 		this.currentDocument = null;
 		this.currentDocument = null;
 		return false;
 		return false;
 	}
 	}