(target)
| 661 | var restoreQueue = null; |
| 662 | |
| 663 | function restoreStateOfTarget(target) { |
| 664 | // We perform this translation at the end of the event loop so that we |
| 665 | // always receive the correct fiber here |
| 666 | var internalInstance = getInstanceFromNode(target); |
| 667 | |
| 668 | if (!internalInstance) { |
| 669 | // Unmounted |
| 670 | return; |
| 671 | } |
| 672 | |
| 673 | if (!(typeof restoreImpl === 'function')) { |
| 674 | { |
| 675 | throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." ); |
| 676 | } |
| 677 | } |
| 678 | |
| 679 | var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted. |
| 680 | |
| 681 | if (stateNode) { |
| 682 | var _props = getFiberCurrentPropsFromNode(stateNode); |
| 683 | |
| 684 | restoreImpl(internalInstance.stateNode, internalInstance.type, _props); |
| 685 | } |
| 686 | } |
| 687 | |
| 688 | function setRestoreImplementation(impl) { |
| 689 | restoreImpl = impl; |
no outgoing calls
no test coverage detected