MCPcopy
hub / github.com/angular-ui/ui-router / completeOutstandingRequest

Function completeOutstandingRequest

test/angular/1.5/angular.js:6043–6058  ·  view source on GitHub ↗

* Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks` * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.

(fn)

Source from the content-addressed store, hash-verified

6041 * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
6042 */
6043 function completeOutstandingRequest(fn) {
6044 try {
6045 fn.apply(null, sliceArgs(arguments, 1));
6046 } finally {
6047 outstandingRequestCount--;
6048 if (outstandingRequestCount === 0) {
6049 while (outstandingRequestCallbacks.length) {
6050 try {
6051 outstandingRequestCallbacks.pop()();
6052 } catch (e) {
6053 $log.error(e);
6054 }
6055 }
6056 }
6057 }
6058 }
6059
6060 function getHash(url) {
6061 var index = url.indexOf('#');

Callers 1

BrowserFunction · 0.70

Calls 1

sliceArgsFunction · 0.70

Tested by

no test coverage detected