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

Function commitCallbacks

code/higher-order-components/public/app.js:8124–8140  ·  view source on GitHub ↗
(queue, context)

Source from the content-addressed store, hash-verified

8122}
8123
8124function commitCallbacks(queue, context) {
8125 var callbackList = queue.callbackList;
8126 if (callbackList === null) {
8127 return;
8128 }
8129 // Set the list to null to make sure they don't get called more than once.
8130 queue.callbackList = null;
8131 for (var i = 0; i < callbackList.length; i++) {
8132 var update = callbackList[i];
8133 var _callback = update.callback;
8134 // This update might be processed again. Clear the callback so it's only
8135 // called once.
8136 update.callback = null;
8137 !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0;
8138 _callback.call(context);
8139 }
8140}
8141
8142var fakeInternalInstance = {};
8143var isArray = Array.isArray;

Callers 1

commitLifeCyclesFunction · 0.70

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected