Fixed a regression that caused SyntaxErrors on IE 11

The changes made in #1334 incorrectly used an arrow function and as this isn't supported on IE 11 it causes a SyntaxError to be thrown when loading chai.
This commit is contained in:
Lee Newson 2021-03-03 17:48:00 +10:00 committed by Keith Cirkel
parent 8a24666156
commit 71245a3e33
No known key found for this signature in database
GPG key ID: 16C9E3C1B8FBBA0C

View file

@ -3178,7 +3178,7 @@ module.exports = function (chai, _) {
} else {
if (isDeep) {
this.assert(
list.some(possibility => _.eql(expected, possibility))
list.some(function(possibility) { return _.eql(expected, possibility) })
, 'expected #{this} to deeply equal one of #{exp}'
, 'expected #{this} to deeply equal one of #{exp}'
, list