diff --git a/src/loading-bar.js b/src/loading-bar.js index 97c6ebe..8f36f4d 100644 --- a/src/loading-bar.js +++ b/src/loading-bar.js @@ -120,7 +120,7 @@ angular.module('cfp.loadingBarInterceptor', ['cfp.loadingBar']) }, 'responseError': function(rejection) { - if (!rejection.config.ignoreLoadingBar && !isCached(rejection.config)) { + if (rejection.config && !rejection.config.ignoreLoadingBar && !isCached(rejection.config)) { reqsCompleted++; $rootScope.$broadcast('cfpLoadingBar:loaded', {url: rejection.config.url, result: rejection}); if (reqsCompleted >= reqsTotal) {