(fiber, update)
| 15885 | return update; |
| 15886 | } |
| 15887 | function enqueueUpdate(fiber, update) { |
| 15888 | var updateQueue = fiber.updateQueue; |
| 15889 | |
| 15890 | if (updateQueue === null) { |
| 15891 | // Only occurs if the fiber has been unmounted. |
| 15892 | return; |
| 15893 | } |
| 15894 | |
| 15895 | var sharedQueue = updateQueue.shared; |
| 15896 | var pending = sharedQueue.pending; |
| 15897 | |
| 15898 | if (pending === null) { |
| 15899 | // This is the first update. Create a circular list. |
| 15900 | update.next = update; |
| 15901 | } else { |
| 15902 | update.next = pending.next; |
| 15903 | pending.next = update; |
| 15904 | } |
| 15905 | |
| 15906 | sharedQueue.pending = update; |
| 15907 | |
| 15908 | { |
| 15909 | if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) { |
| 15910 | error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.'); |
| 15911 | |
| 15912 | didWarnUpdateInsideUpdate = true; |
| 15913 | } |
| 15914 | } |
| 15915 | } |
| 15916 | function enqueueCapturedUpdate(workInProgress, update) { |
| 15917 | var current = workInProgress.alternate; |
| 15918 |
no test coverage detected