(current,workInProgress,renderPriority)
| 7502 | // down its children. Instead, we'll get insertions from each child in |
| 7503 | // the portal directly. |
| 7504 | }else if(node.child!==null){node=node.child;continue;}if(node===workInProgress){return;}while(node.sibling===null){if(node['return']===null||node['return']===workInProgress){return;}node=node['return'];}node=node.sibling;}}function completeWork(current,workInProgress,renderPriority){{ReactDebugCurrentFiber$5.setCurrentFiber(workInProgress,null);}// Get the latest props. |
| 7505 | var newProps=workInProgress.pendingProps;if(newProps===null){newProps=workInProgress.memoizedProps;}else if(workInProgress.pendingWorkPriority!==OffscreenPriority$2||renderPriority===OffscreenPriority$2){// Reset the pending props, unless this was a down-prioritization. |
| 7506 | workInProgress.pendingProps=null;}switch(workInProgress.tag){case FunctionalComponent$3:return null;case ClassComponent$8:{// We are leaving this subtree, so pop context if any. |
| 7507 | popContextProvider$2(workInProgress);return null;}case HostRoot$8:{popHostContainer(workInProgress);popTopLevelContextObject$1(workInProgress);var fiberRoot=workInProgress.stateNode;if(fiberRoot.pendingContext){fiberRoot.context=fiberRoot.pendingContext;fiberRoot.pendingContext=null;}if(current===null||current.child===null){// If we hydrated, pop so that we can delete any remaining children |
| 7508 | // that weren't hydrated. |
| 7509 | popHydrationState(workInProgress);// This resets the hacky state to fix isMounted before committing. |
| 7510 | // TODO: Delete this when we delete isMounted and findDOMNode. |
| 7511 | workInProgress.effectTag&=~Placement$4;}return null;}case HostComponent$8:{popHostContext(workInProgress);var rootContainerInstance=getRootHostContainer();var type=workInProgress.type;if(current!==null&&workInProgress.stateNode!=null){// If we have an alternate, that means this is an update and we need to |
| 7512 | // schedule a side-effect to do the updates. |
| 7513 | var oldProps=current.memoizedProps;// If we get updated because one of our children updated, we don't |
| 7514 | // have newProps so we'll have to reuse them. |
| 7515 | // TODO: Split the update API as separate for the props vs. children. |
| 7516 | // Even better would be if children weren't special cased at all tho. |
| 7517 | var instance=workInProgress.stateNode;var currentHostContext=getHostContext();var updatePayload=prepareUpdate(instance,type,oldProps,newProps,rootContainerInstance,currentHostContext);// TODO: Type this specific to this type of component. |
| 7518 | workInProgress.updateQueue=updatePayload;// If the update payload indicates that there is a change or if there |
| 7519 | // is a new ref we mark this as an update. |
| 7520 | if(updatePayload){markUpdate(workInProgress);}if(current.ref!==workInProgress.ref){markRef(workInProgress);}}else{if(!newProps){!(workInProgress.stateNode!==null)?invariant(false,'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.'):void 0;// This can happen when we abort work. |
| 7521 | return null;}var _currentHostContext=getHostContext();// TODO: Move createInstance to beginWork and keep it on a context |
| 7522 | // "stack" as the parent. Then append children as we go in beginWork |
| 7523 | // or completeWork depending on we want to add then top->down or |
| 7524 | // bottom->up. Top->down is faster in IE11. |
| 7525 | var wasHydrated=popHydrationState(workInProgress);if(wasHydrated){// TOOD: Move this and createInstance step into the beginPhase |
| 7526 | // to consolidate. |
| 7527 | if(prepareToHydrateHostInstance(workInProgress,rootContainerInstance,_currentHostContext)){// If changes to the hydrated node needs to be applied at the |
| 7528 | // commit-phase we mark this as such. |
| 7529 | markUpdate(workInProgress);}}else{var _instance=createInstance(type,newProps,rootContainerInstance,_currentHostContext,workInProgress);appendAllChildren(_instance,workInProgress);// Certain renderers require commit-time effects for initial mount. |
| 7530 | // (eg DOM renderer supports auto-focus for certain elements). |
| 7531 | // Make sure such renderers get scheduled for later work. |
| 7532 | if(finalizeInitialChildren(_instance,type,newProps,rootContainerInstance)){markUpdate(workInProgress);}workInProgress.stateNode=_instance;}if(workInProgress.ref!==null){// If there is a ref on a host node we need to schedule a callback |
| 7533 | markRef(workInProgress);}}return null;}case HostText$6:{var newText=newProps;if(current&&workInProgress.stateNode!=null){var oldText=current.memoizedProps;// If we have an alternate, that means this is an update and we need |
| 7534 | // to schedule a side-effect to do the updates. |
| 7535 | if(oldText!==newText){markUpdate(workInProgress);}}else{if(typeof newText!=='string'){!(workInProgress.stateNode!==null)?invariant(false,'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.'):void 0;// This can happen when we abort work. |
| 7536 | return null;}var _rootContainerInstance=getRootHostContainer();var _currentHostContext2=getHostContext();var _wasHydrated=popHydrationState(workInProgress);if(_wasHydrated){if(prepareToHydrateHostTextInstance(workInProgress)){markUpdate(workInProgress);}}else{workInProgress.stateNode=createTextInstance(newText,_rootContainerInstance,_currentHostContext2,workInProgress);}}return null;}case CoroutineComponent$3:return moveCoroutineToHandlerPhase(current,workInProgress);case CoroutineHandlerPhase$1:// Reset the tag to now be a first phase coroutine. |
| 7537 | workInProgress.tag=CoroutineComponent$3;return null;case YieldComponent$4:// Does nothing. |
| 7538 | return null;case Fragment$4:return null;case HostPortal$6:// TODO: Only mark this as an update if we have any pending callbacks. |
| 7539 | markUpdate(workInProgress);popHostContainer(workInProgress);return null;// Error cases |
| 7540 | case IndeterminateComponent$3:invariant(false,'An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.');// eslint-disable-next-line no-fallthrough |
| 7541 | default:invariant(false,'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');}}return{completeWork:completeWork};};{var warning$26=require$$0;}var onCommitFiberRoot=null;var onCommitFiberUnmount=null;var hasLoggedError=false;function catchErrors(fn){return function(arg){try{return fn(arg);}catch(err){if(true&&!hasLoggedError){hasLoggedError=true;warning$26(false,'React DevTools encountered an error: %s',err);}}};}function injectInternals$1(internals){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__==='undefined'){// No DevTools |
| 7542 | return false;}var hook=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hook.supportsFiber){{warning$26(false,'The installed version of React DevTools is too old and will not work '+'with the current version of React. Please update React DevTools. '+'https://fb.me/react-devtools');}// DevTools exists, even though it doesn't support Fiber. |
| 7543 | return true;}try{var rendererID=hook.inject(internals);// We have successfully injected, so now it is safe to set up hooks. |
| 7544 | onCommitFiberRoot=catchErrors(function(root){return hook.onCommitFiberRoot(rendererID,root);});onCommitFiberUnmount=catchErrors(function(fiber){return hook.onCommitFiberUnmount(rendererID,fiber);});}catch(err){// Catch all errors because it is unsafe to throw during initialization. |
no test coverage detected