(queue, context)
| 7452 | } |
| 7453 | |
| 7454 | function commitCallbacks(queue, context) { |
| 7455 | var callbackList = queue.callbackList; |
| 7456 | if (callbackList === null) { |
| 7457 | return; |
| 7458 | } |
| 7459 | // Set the list to null to make sure they don't get called more than once. |
| 7460 | queue.callbackList = null; |
| 7461 | for (var i = 0; i < callbackList.length; i++) { |
| 7462 | var update = callbackList[i]; |
| 7463 | var _callback = update.callback; |
| 7464 | // This update might be processed again. Clear the callback so it's only |
| 7465 | // called once. |
| 7466 | update.callback = null; |
| 7467 | !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0; |
| 7468 | _callback.call(context); |
| 7469 | } |
| 7470 | } |
| 7471 | |
| 7472 | var fakeInternalInstance = {}; |
| 7473 | var isArray = Array.isArray; |
no test coverage detected