mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Clear deletions in detachFiber (#20401)
This was added in a later step of the refactor but since `deletions` array already landed, clearing it should, too. I think it's unlikely that this causes GC problems but worth adding anyway.
This commit is contained in:
@@ -1074,6 +1074,7 @@ function detachFiberMutation(fiber: Fiber) {
|
||||
// and one of its descendants throws while unmounting a passive effect.
|
||||
fiber.alternate = null;
|
||||
fiber.child = null;
|
||||
fiber.deletions = null;
|
||||
fiber.dependencies = null;
|
||||
fiber.firstEffect = null;
|
||||
fiber.lastEffect = null;
|
||||
|
||||
@@ -1074,6 +1074,7 @@ function detachFiberMutation(fiber: Fiber) {
|
||||
// and one of its descendants throws while unmounting a passive effect.
|
||||
fiber.alternate = null;
|
||||
fiber.child = null;
|
||||
fiber.deletions = null;
|
||||
fiber.dependencies = null;
|
||||
fiber.firstEffect = null;
|
||||
fiber.lastEffect = null;
|
||||
|
||||
Reference in New Issue
Block a user