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

Function getHostParentFiber

code/third-party/public/app.js:10834–10843  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

10832
10833
10834 function getHostParentFiber(fiber) {
10835 var parent = fiber['return'];
10836 while (parent !== null) {
10837 if (isHostParent(parent)) {
10838 return parent;
10839 }
10840 parent = parent['return'];
10841 }
10842 invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
10843 }
10844
10845 function isHostParent(fiber) {
10846 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