Skip to content

Commit

Permalink
fix(react-v19): Ignore ReactCurrentDispatcher not existing in react-s…
Browse files Browse the repository at this point in the history
…ever conditional env
  • Loading branch information
FMota0 committed Nov 22, 2024
1 parent 4b15716 commit b19a571
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/visitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ import {

import { isClientReference } from './utils'

const { ReactCurrentDispatcher } =
const REACT_INTERNALS =
(React: any).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ||
(React: any).__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE

const ReactCurrentDispatcher =
REACT_INTERNALS && REACT_INTERNALS.ReactCurrentDispatcher

// In the presence of setImmediate, i.e. on Node, we'll enable the
// yielding behavior that gives the event loop a chance to continue
// running when the prepasses would otherwise take too long
Expand Down

0 comments on commit b19a571

Please sign in to comment.