浏览代码

Merge pull request #63 from RiveraGroup/feature/mongo_2.6.5_matcher_OrMatchExpression

EAGLESIX-3007: Added setTag() code to shallowClone().
Chris Sexton 11 年之前
父节点
当前提交
1da77ebe26
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      lib/pipeline/matcher/OrMatchExpression.js

+ 6 - 0
lib/pipeline/matcher/OrMatchExpression.js

@@ -64,9 +64,15 @@ proto.matchesSingleElement = function matchesSingleElement(e) {
 proto.shallowClone = function shallowClone(){
 proto.shallowClone = function shallowClone(){
 	// File: expression_tree.h lines: 86-91
 	// File: expression_tree.h lines: 86-91
 	var clone = new OrMatchExpression();
 	var clone = new OrMatchExpression();
+
 	for (var i = 0; i < this.numChildren(); i++) {
 	for (var i = 0; i < this.numChildren(); i++) {
 		clone.add(this.getChild(i).shallowClone());
 		clone.add(this.getChild(i).shallowClone());
 	}
 	}
+
+	if (this.getTag()) {
+		clone.setTag(this.getTag().clone());
+	}
+
 	return clone;
 	return clone;
 };
 };