Skip to content

Commit faa37ba

Browse files
committed
fix(contains): issue #64
1 parent 452caba commit faa37ba

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/_filter/collection/contains.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ function containsFilter( $parse ) {
1919
collection = (isObject(collection)) ? toArray(collection) : collection;
2020

2121
if(!isArray(collection) || isUndefined(expression)) {
22-
return true;
22+
return false;
2323
}
2424

25-
return collection.some( function(elm) {
26-
27-
return (isObject(elm) || isFunction(expression)) ?
28-
$parse(expression)(elm) :
29-
elm === expression;
30-
25+
return collection.some(function(elm) {
26+
return (isObject(elm) || isFunction(expression))
27+
? $parse(expression)(elm)
28+
: elm === expression;
3129
});
3230

3331
}

0 commit comments

Comments
 (0)