mirror of
https://github.com/chaijs/chai
synced 2024-11-15 08:17:14 +00:00
aborting loop on finding
This commit is contained in:
parent
350a802a4e
commit
2c78b57824
1 changed files with 3 additions and 1 deletions
|
@ -150,8 +150,10 @@ module.exports = function (chai, _) {
|
|||
var expected = false;
|
||||
if (_.type(obj) === 'array' && _.type(val) === 'object') {
|
||||
for (var i in obj) {
|
||||
if (_.eql(obj[i], val))
|
||||
if (_.eql(obj[i], val)) {
|
||||
expected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (_.type(val) === 'object') {
|
||||
if (!flag(this, 'negate')) {
|
||||
|
|
Loading…
Reference in a new issue