ソースを参照

EAGLESIX-3007: Added setTag() code to shallowClone().

Scott Munday 11 年 前
コミット
52bcd30789
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(){
 	// File: expression_tree.h lines: 86-91
 	var clone = new OrMatchExpression();
+
 	for (var i = 0; i < this.numChildren(); i++) {
 		clone.add(this.getChild(i).shallowClone());
 	}
+
+	if (this.getTag()) {
+		clone.setTag(this.getTag().clone());
+	}
+
 	return clone;
 };