Skip to content

Commit

Permalink
Fix: Incorrect type of thenable passed to DevTools
Browse files Browse the repository at this point in the history
Selective hydration is implemented by suspending the current render
using a special internal opaque object. This is conceptually similar to
suspending with a thenable in userspace, but the opaque object should
not leak outside of the reconciler.

We were accidentally passing this object to DevTool's
markComponentSuspended function, which expects an actual thenable. This
happens in the error handling path (handleThrow).

The fix is to check for the exception reason before calling
markComponentSuspended. There was already a naive check in place, but
it didn't account for all possible enum values of the exception reason.
  • Loading branch information
acdlite committed Mar 1, 2023
1 parent 67a61d5 commit 0121a45
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 0121a45

Please sign in to comment.