An improvement for containingString in #133.

This commit is contained in:
Nick Winter 2014-01-10 17:04:12 -08:00
parent a6f1ce53ba
commit 2383d5dd3a

View file

@ -10,7 +10,7 @@ module.exports.scriptMatchesEventPrereqs = scriptMatchesEventPrereqs = (script,
return false if ap.greaterThanOrEqualTo? and not (v >= ap.greaterThanOrEqualTo)
return false if ap.lessThan? and not (v < ap.lessThan)
return false if ap.lessThanOrEqualTo? and not (v <= ap.lessThanOrEqualTo)
return false if ap.containingString? and v.search(ap.containingString) == -1
return false if ap.notContainingString? and v.search(ap.containingString) != -1
return false if ap.containingString? and v?.search(ap.containingString) == -1
return false if ap.notContainingString? and v?.search(ap.containingString) != -1
return true