Skip to content

Commit

Permalink
Merge pull request #8568 from bvaughn/top-level-context-push-pop
Browse files Browse the repository at this point in the history
HostRoot no longer pops context provider during complete phase
  • Loading branch information
bvaughn committed Dec 14, 2016
2 parents 480e404 + b4745ca commit 3def431
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion src/renderers/shared/fiber/ReactFiberCompleteWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ module.exports = function<T, P, I, TI, C, CX>(
return null;
case HostRoot: {
workInProgress.memoizedProps = workInProgress.pendingProps;
popContextProvider();
const fiberRoot = (workInProgress.stateNode : FiberRoot);
if (fiberRoot.pendingContext) {
fiberRoot.context = fiberRoot.pendingContext;
Expand Down
1 change: 1 addition & 0 deletions src/renderers/shared/fiber/ReactFiberContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ function isContextProvider(fiber : Fiber) : boolean {
exports.isContextProvider = isContextProvider;

function popContextProvider() : void {
invariant(index > -1, 'Unexpected context pop');
contextStack[index] = emptyObject;
didPerformWorkStack[index] = false;
index--;
Expand Down

0 comments on commit 3def431

Please sign in to comment.