MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / commitCallbacks

Function commitCallbacks

code/dependency-injection/public/app.js:8223–8239  ·  view source on GitHub ↗
(queue, context)

Source from the content-addressed store, hash-verified

8221}
8222
8223function commitCallbacks(queue, context) {
8224 var callbackList = queue.callbackList;
8225 if (callbackList === null) {
8226 return;
8227 }
8228 // Set the list to null to make sure they don't get called more than once.
8229 queue.callbackList = null;
8230 for (var i = 0; i < callbackList.length; i++) {
8231 var update = callbackList[i];
8232 var _callback = update.callback;
8233 // This update might be processed again. Clear the callback so it's only
8234 // called once.
8235 update.callback = null;
8236 !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0;
8237 _callback.call(context);
8238 }
8239}
8240
8241var fakeInternalInstance = {};
8242var isArray = Array.isArray;

Callers 1

commitLifeCyclesFunction · 0.70

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected