mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge b0daa4771f into sapling-pr-archive-poteto
This commit is contained in:
@@ -130,9 +130,10 @@ export function commitHookEffectListMount(
|
||||
finishedWork: Fiber,
|
||||
) {
|
||||
try {
|
||||
const updateQueue: FunctionComponentUpdateQueue | null =
|
||||
const updateQueueMount: FunctionComponentUpdateQueue | null =
|
||||
(finishedWork.updateQueue: any);
|
||||
const lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
|
||||
const lastEffect =
|
||||
updateQueueMount !== null ? updateQueueMount.lastEffect : null;
|
||||
if (lastEffect !== null) {
|
||||
const firstEffect = lastEffect.next;
|
||||
let effect = firstEffect;
|
||||
@@ -252,9 +253,10 @@ export function commitHookEffectListUnmount(
|
||||
nearestMountedAncestor: Fiber | null,
|
||||
) {
|
||||
try {
|
||||
const updateQueue: FunctionComponentUpdateQueue | null =
|
||||
const updateQueueUnmount: FunctionComponentUpdateQueue | null =
|
||||
(finishedWork.updateQueue: any);
|
||||
const lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
|
||||
const lastEffect =
|
||||
updateQueueUnmount !== null ? updateQueueUnmount.lastEffect : null;
|
||||
if (lastEffect !== null) {
|
||||
const firstEffect = lastEffect.next;
|
||||
let effect = firstEffect;
|
||||
|
||||
Reference in New Issue
Block a user