MCPcopy Create free account
hub / github.com/danielstocks/react-sortable / findCurrentHostFiberWithNoPortals

Function findCurrentHostFiberWithNoPortals

bundle.js:5733–5736  ·  view source on GitHub ↗
(parent)

Source from the content-addressed store, hash-verified

5731var node=currentParent;while(true){if(node.tag===HostComponent$1||node.tag===HostText$1){return node;}else if(node.child){node.child['return']=node;node=node.child;continue;}if(node===currentParent){return null;}while(!node.sibling){if(!node['return']||node['return']===currentParent){return null;}node=node['return'];}node.sibling['return']=node['return'];node=node.sibling;}// Flow needs the return null here, but ESLint complains about it.
5732// eslint-disable-next-line no-unreachable
5733return null;};var findCurrentHostFiberWithNoPortals=function findCurrentHostFiberWithNoPortals(parent){var currentParent=findCurrentFiberUsingSlowPath(parent);if(!currentParent){return null;}// Next we'll drill down this component to find the first HostComponent/Text.
5734var node=currentParent;while(true){if(node.tag===HostComponent$1||node.tag===HostText$1){return node;}else if(node.child&&node.tag!==HostPortal){node.child['return']=node;node=node.child;continue;}if(node===currentParent){return null;}while(!node.sibling){if(!node['return']||node['return']===currentParent){return null;}node=node['return'];}node.sibling['return']=node['return'];node=node.sibling;}// Flow needs the return null here, but ESLint complains about it.
5735// eslint-disable-next-line no-unreachable
5736return null;};var ReactFiberTreeReflection={isFiberMounted:isFiberMounted,isMounted:isMounted,findCurrentFiberUsingSlowPath:findCurrentFiberUsingSlowPath_1,findCurrentHostFiber:findCurrentHostFiber,findCurrentHostFiberWithNoPortals:findCurrentHostFiberWithNoPortals};var ReactErrorUtils={// Used by Fiber to simulate a try-catch.
5737_caughtError:null,_hasCaughtError:false,// Used by event system to capture/rethrow the first error.
5738_rethrowError:null,_hasRethrowError:false,injection:{injectErrorUtils:function injectErrorUtils(injectedErrorUtils){!(typeof injectedErrorUtils.invokeGuardedCallback==='function')?invariant(false,'Injected invokeGuardedCallback() must be a function.'):void 0;_invokeGuardedCallback=injectedErrorUtils.invokeGuardedCallback;}},/**
5739 * Call a function while guarding against errors that happens within it.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected