MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / commitCallbacks

Function commitCallbacks

code/event-handlers/public/app.js:7460–7476  ·  view source on GitHub ↗
(queue, context)

Source from the content-addressed store, hash-verified

7458}
7459
7460function commitCallbacks(queue, context) {
7461 var callbackList = queue.callbackList;
7462 if (callbackList === null) {
7463 return;
7464 }
7465 // Set the list to null to make sure they don't get called more than once.
7466 queue.callbackList = null;
7467 for (var i = 0; i < callbackList.length; i++) {
7468 var update = callbackList[i];
7469 var _callback = update.callback;
7470 // This update might be processed again. Clear the callback so it's only
7471 // called once.
7472 update.callback = null;
7473 !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0;
7474 _callback.call(context);
7475 }
7476}
7477
7478var fakeInternalInstance = {};
7479var isArray = Array.isArray;

Callers 1

commitLifeCyclesFunction · 0.70

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected