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

Function getHostParentFiber

code/styling/public/app.js:11601–11610  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

11599
11600
11601 function getHostParentFiber(fiber) {
11602 var parent = fiber['return'];
11603 while (parent !== null) {
11604 if (isHostParent(parent)) {
11605 return parent;
11606 }
11607 parent = parent['return'];
11608 }
11609 invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
11610 }
11611
11612 function isHostParent(fiber) {
11613 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