(fiber)
| 302 | |
| 303 | function commitEffectHooks() { |
| 304 | function runCleanup(fiber){ |
| 305 | if (!fiber) return; |
| 306 | |
| 307 | fiber.alternate?.effectHooks?.forEach((hook, index)=>{ |
| 308 | const deps = fiber.effectHooks[index].deps; |
| 309 | |
| 310 | if (!hook.deps || !isDepsEqual(hook.deps, deps)) { |
| 311 | hook.cleanup?.(); |
| 312 | } |
| 313 | }) |
| 314 | |
| 315 | runCleanup(fiber.child); |
| 316 | runCleanup(fiber.sibling); |
| 317 | } |
| 318 | |
| 319 | function run(fiber) { |
| 320 | if (!fiber) return; |
no test coverage detected