From ad33e8f0ba725965730e912572e77bb2014c5a2b Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Wed, 10 Jan 2024 11:46:20 +0000 Subject: [PATCH] fix: removes `??` for node compat We shipped syntax which is beyond our `engine` constraint. `??` is available in node 14 but 4.x is node 4 and above, while 5.x is node 12 and above. This just dumbs it back down to `||` for now at least. Fixes #1573 --- lib/chai/assertion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chai/assertion.js b/lib/chai/assertion.js index b54b64cd..32e7ee2b 100644 --- a/lib/chai/assertion.js +++ b/lib/chai/assertion.js @@ -66,7 +66,7 @@ module.exports = function (_chai, util) { flag(this, 'lockSsfi', lockSsfi); flag(this, 'object', obj); flag(this, 'message', msg); - flag(this, 'eql', config.deepEqual ?? util.eql); + flag(this, 'eql', config.deepEqual || util.eql); return util.proxify(this); }