From 71245a3e33db0056d3de4ee9e5dee974ffbda8f4 Mon Sep 17 00:00:00 2001 From: Lee Newson Date: Wed, 3 Mar 2021 17:48:00 +1000 Subject: [PATCH] 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. --- lib/chai/core/assertions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index 71baf3a99..2e8f807cf 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -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