Skip to content

Commit

Permalink
fix: reject on load error
Browse files Browse the repository at this point in the history
Fixes #66
  • Loading branch information
ocombe committed Sep 25, 2014
1 parent f35f793 commit d83f52b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ocLazyLoad.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,11 @@
});

// Resolve the promise once everything has loaded
$q.all(deferredList).then(function() {
$q.all(deferredList).then(function success() {
deferred.resolve(module);
});
}, function error(err) {
deferred.reject(err);
});

return deferred.promise;
}
Expand Down

0 comments on commit d83f52b

Please sign in to comment.