MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / getHostParentFiber

Function getHostParentFiber

code/new-context-api/public/app.js:10962–10971  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

10960
10961
10962 function getHostParentFiber(fiber) {
10963 var parent = fiber['return'];
10964 while (parent !== null) {
10965 if (isHostParent(parent)) {
10966 return parent;
10967 }
10968 parent = parent['return'];
10969 }
10970 invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
10971 }
10972
10973 function isHostParent(fiber) {
10974 return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;

Callers 1

commitPlacementFunction · 0.70

Calls 2

isHostParentFunction · 0.70
invariantFunction · 0.70

Tested by

no test coverage detected