Переглянути джерело

EAGLESIX-2653 fixed bug in the inMatch expression

Phil Murray 11 роки тому
батько
коміт
313cbf66af

+ 1 - 12
lib/pipeline/matcher/InMatchExpression.js

@@ -38,17 +38,8 @@ proto._matchesRealElement = function _matchesRealElement(e) {
 	}
 
 	for (var i = 0; i < this._arrayEntries.numRegexes(); i++) {
-		if(e.match && e.match(this._arrayEntries.regex(i)._regex)) {
+		if ( this._arrayEntries.regex(i).matchesSingleElement( e ) )
 			return true;
-		} else if (e instanceof RegExp) {
-			if(e.toString() === this._arrayEntries.regex(i)._regex.toString()) {
-				return true;
-			}
-		}
-	}
-
-	if(typeof(e) === 'undefined') {
-		return true; // Every Set contains the Null Set.
 	}
 
 	return false;
@@ -150,5 +141,3 @@ proto.getArrayFilterEntries = function getArrayFilterEntries(){
 proto.getData = function getData(){
 	return this._arrayEntries;
 };
-
-

+ 0 - 1
test/lib/pipeline/matcher/MatchExpressionParser.js

@@ -592,4 +592,3 @@ module.exports = {
 };
 
 if (!module.parent)(new(require("mocha"))()).ui("exports").reporter("spec").addFile(__filename).run(process.exit);
-