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

Function commitCallbacks

code/styling/public/app.js:8130–8146  ·  view source on GitHub ↗
(queue, context)

Source from the content-addressed store, hash-verified

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

Callers 1

commitLifeCyclesFunction · 0.70

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected