Преглед изворни кода

EAGLESIX-2985: Fixed up debugString

David Aebersold пре 11 година
родитељ
комит
22aeb72c7f
1 измењених фајлова са 2 додато и 9 уклоњено
  1. 2 9
      lib/pipeline/matcher/ElemMatchValueMatchExpression.js

+ 2 - 9
lib/pipeline/matcher/ElemMatchValueMatchExpression.js

@@ -48,16 +48,9 @@ proto.add = function add(sub){
  *
  */
 proto.debugString = function debugString(level){
-	var debug = this._debugAddSpace(level);
-	debug = debug + this.path() + " $elemMatch\n";
-
-	var td = this.getTag();
-	if (td !== null) {
-		debug += " " + td.debugString();
-	}
-	debug += "\n";
+	var debug = this._debugAddSpace(level) + this.path() + " $elemMatch (value)" + (this.getTag() ? this.getTag().debugString() : '') + "\n"
 	for (var i = 0; i < this._subs.length; i++) {
-		debug = debug + this._subs[i].debugString(level + 1);
+		debug += this._subs[i].debugString(level + 1);
 	}
 	return debug;
 };