[Transition Tracing] Fix Cache and Transitions Pop Order (#24719)

We push the Cache before the transition so we should pop the transition before the cache. This PR fixes this issue.
This commit is contained in:
Luna Ruan
2022-06-14 11:48:01 -07:00
committed by GitHub
parent be229c5655
commit 54f17e490f
2 changed files with 8 additions and 8 deletions
@@ -139,13 +139,13 @@ export function pushTransition(
export function popTransition(workInProgress: Fiber, current: Fiber | null) {
if (current !== null) {
if (enableCache) {
pop(resumedCache, workInProgress);
}
if (enableTransitionTracing) {
pop(transitionStack, workInProgress);
}
if (enableCache) {
pop(resumedCache, workInProgress);
}
}
}
@@ -139,13 +139,13 @@ export function pushTransition(
export function popTransition(workInProgress: Fiber, current: Fiber | null) {
if (current !== null) {
if (enableCache) {
pop(resumedCache, workInProgress);
}
if (enableTransitionTracing) {
pop(transitionStack, workInProgress);
}
if (enableCache) {
pop(resumedCache, workInProgress);
}
}
}