Skip to content

Commit

Permalink
fix: Stop using nullish coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Apr 11, 2024
1 parent 787cb85 commit e165e44
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 e165e44

Please sign in to comment.