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

Function getHostParentFiber

code/composition/public/app.js:11739–11748  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

11737
11738
11739 function getHostParentFiber(fiber) {
11740 var parent = fiber['return'];
11741 while (parent !== null) {
11742 if (isHostParent(parent)) {
11743 return parent;
11744 }
11745 parent = parent['return'];
11746 }
11747 invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
11748 }
11749
11750 function isHostParent(fiber) {
11751 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