(queue, context)
| 8379 | } |
| 8380 | |
| 8381 | function commitCallbacks(queue, context) { |
| 8382 | var callbackList = queue.callbackList; |
| 8383 | if (callbackList === null) { |
| 8384 | return; |
| 8385 | } |
| 8386 | // Set the list to null to make sure they don't get called more than once. |
| 8387 | queue.callbackList = null; |
| 8388 | for (var i = 0; i < callbackList.length; i++) { |
| 8389 | var update = callbackList[i]; |
| 8390 | var _callback = update.callback; |
| 8391 | // This update might be processed again. Clear the callback so it's only |
| 8392 | // called once. |
| 8393 | update.callback = null; |
| 8394 | !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0; |
| 8395 | _callback.call(context); |
| 8396 | } |
| 8397 | } |
| 8398 | |
| 8399 | var fakeInternalInstance = {}; |
| 8400 | var isArray = Array.isArray; |
no test coverage detected