Skip to content

Commit

Permalink
Push host root context when bailing out on low priority (facebook#10712)
Browse files Browse the repository at this point in the history
Prevents a push/pop mismatch when bailing out on HostRoots. This is
currently unobservable, because HostRoots never bail out on low
priority, but this does happen with prerendering.

I found this when rebasing facebook#10624 on top of master.
  • Loading branch information
acdlite committed Sep 14, 2017
1 parent 836d1c5 commit b5ac963
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/renderers/shared/fiber/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,9 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
// TODO: Handle HostComponent tags here as well and call pushHostContext()?
// See PR 8590 discussion for context
switch (workInProgress.tag) {
case HostRoot:
pushHostRootContext(workInProgress);
break;
case ClassComponent:
pushContextProvider(workInProgress);
break;
Expand Down

0 comments on commit b5ac963

Please sign in to comment.