From fd2191644f69cc1c8ab499b0dc5ea735241284f0 Mon Sep 17 00:00:00 2001 From: James Garbutt Date: Wed, 10 Jan 2024 11:44:22 +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); }