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

Function executeDirectDispatch

bundle.js:5844–5844  ·  view source on GitHub ↗

* Execution of a "direct" dispatch - there must be at most one dispatch * accumulated on the event or it is considered an error. It doesn't really make * sense for an event with multiple dispatches (bubbled) to keep track of the * return values at each dispatch execution, but it does tend to make

(event)

Source from the content-addressed store, hash-verified

5842 *
5843 * @return {*} The return value of executing the single dispatch.
5844 */function executeDirectDispatch(event){{validateEventDispatches(event);}var dispatchListener=event._dispatchListeners;var dispatchInstance=event._dispatchInstances;!!Array.isArray(dispatchListener)?invariant(false,'executeDirectDispatch(...): Invalid `event`.'):void 0;event.currentTarget=dispatchListener?EventPluginUtils.getNodeFromInstance(dispatchInstance):null;var res=dispatchListener?dispatchListener(event):null;event.currentTarget=null;event._dispatchListeners=null;event._dispatchInstances=null;return res;}/**
5845 * @param {SyntheticEvent} event
5846 * @return {boolean} True iff number of dispatches accumulated is greater than 0.
5847 */function hasDispatches(event){return!!event._dispatchListeners;}/**

Callers

nothing calls this directly

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected