From 2523cd72c9424b4a8aa04865c79d91c499031ba7 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Fri, 12 Jan 2024 20:42:38 +0000 Subject: [PATCH] fix: removes `??` for node compat (#1576) 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. --- 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 54a9d77f..c8c416d1 100644 --- a/lib/chai/assertion.js +++ b/lib/chai/assertion.js @@ -54,7 +54,7 @@ export function Assertion (obj, msg, ssfi, lockSsfi) { util.flag(this, 'lockSsfi', lockSsfi); util.flag(this, 'object', obj); util.flag(this, 'message', msg); - util.flag(this, 'eql', config.deepEqual ?? util.eql); + util.flag(this, 'eql', config.deepEqual || util.eql); return util.proxify(this); }