Skip to content

Commit

Permalink
fix: Stop using nullish coalescing (testing-library#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Apr 11, 2024
1 parent 9c4a46d commit 8747b8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/act-compat.js
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down

0 comments on commit 8747b8a

Please sign in to comment.