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

Function commitCallbacks

code/third-party/public/app.js:7363–7379  ·  view source on GitHub ↗
(queue, context)

Source from the content-addressed store, hash-verified

7361}
7362
7363function commitCallbacks(queue, context) {
7364 var callbackList = queue.callbackList;
7365 if (callbackList === null) {
7366 return;
7367 }
7368 // Set the list to null to make sure they don't get called more than once.
7369 queue.callbackList = null;
7370 for (var i = 0; i < callbackList.length; i++) {
7371 var update = callbackList[i];
7372 var _callback = update.callback;
7373 // This update might be processed again. Clear the callback so it's only
7374 // called once.
7375 update.callback = null;
7376 !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0;
7377 _callback.call(context);
7378 }
7379}
7380
7381var fakeInternalInstance = {};
7382var isArray = Array.isArray;

Callers 1

commitLifeCyclesFunction · 0.70

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected