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

Function commitCallbacks

code/new-context-api/public/app.js:7491–7507  ·  view source on GitHub ↗
(queue, context)

Source from the content-addressed store, hash-verified

7489}
7490
7491function commitCallbacks(queue, context) {
7492 var callbackList = queue.callbackList;
7493 if (callbackList === null) {
7494 return;
7495 }
7496 // Set the list to null to make sure they don't get called more than once.
7497 queue.callbackList = null;
7498 for (var i = 0; i < callbackList.length; i++) {
7499 var update = callbackList[i];
7500 var _callback = update.callback;
7501 // This update might be processed again. Clear the callback so it's only
7502 // called once.
7503 update.callback = null;
7504 !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0;
7505 _callback.call(context);
7506 }
7507}
7508
7509var fakeInternalInstance = {};
7510var isArray = Array.isArray;

Callers 1

commitLifeCyclesFunction · 0.70

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected