(queue, context)
| 8221 | } |
| 8222 | |
| 8223 | function 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 | |
| 8241 | var fakeInternalInstance = {}; |
| 8242 | var isArray = Array.isArray; |
no test coverage detected