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:
Andrew Clark
2020-12-08 17:13:20 -08:00
committed by GitHub
parent b9680aef7d
commit 7659949d65
2 changed files with 2 additions and 0 deletions
@@ -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;