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

Function commitCallbacks

code/communication/public/app.js:8165–8181  ·  view source on GitHub ↗
(queue, context)

Source from the content-addressed store, hash-verified

8163}
8164
8165function commitCallbacks(queue, context) {
8166 var callbackList = queue.callbackList;
8167 if (callbackList === null) {
8168 return;
8169 }
8170 // Set the list to null to make sure they don't get called more than once.
8171 queue.callbackList = null;
8172 for (var i = 0; i < callbackList.length; i++) {
8173 var update = callbackList[i];
8174 var _callback = update.callback;
8175 // This update might be processed again. Clear the callback so it's only
8176 // called once.
8177 update.callback = null;
8178 !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0;
8179 _callback.call(context);
8180 }
8181}
8182
8183var fakeInternalInstance = {};
8184var isArray = Array.isArray;

Callers 1

commitLifeCyclesFunction · 0.70

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected