From e165e44d8526dda78c215dbc95c2a5f2d9d5d0d6 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Thu, 11 Apr 2024 18:42:54 +0200 Subject: [PATCH] fix: Stop using nullish coalescing --- src/act-compat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/act-compat.js b/src/act-compat.js index 5877755c..6eaec0fb 100644 --- a/src/act-compat.js +++ b/src/act-compat.js @@ -1,7 +1,8 @@ import * as React from 'react' import * as DeprecatedReactTestUtils from 'react-dom/test-utils' -const reactAct = React.act ?? DeprecatedReactTestUtils.act +const reactAct = + typeof React.act === 'function' ? React.act : DeprecatedReactTestUtils.act function getGlobalThis() { /* istanbul ignore else */