Skip to content

Commit

Permalink
fix: Stop using nullish coalescing (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Apr 11, 2024
1 parent 9c4a46d commit 8434a24
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 8434a24

Please sign in to comment.