Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
fix(partialloader): fix possible circular dependency
Browse files Browse the repository at this point in the history
This is a bugfix for b685601 (affecting 0.4.x).

Fixes #766
  • Loading branch information
knalli committed Oct 21, 2014
1 parent fe9a661 commit 25f252c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/service/loader-partial.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ angular.module('pascalprecht.translate')
*
* @throws {TypeError}
*/
this.$get = ['$rootScope', '$injector', '$q', '$http', '$translate',
function($rootScope, $injector, $q, $http, $translate) {
this.$get = ['$rootScope', '$injector', '$q', '$http',
function($rootScope, $injector, $q, $http) {

/**
* @ngdoc event
Expand Down Expand Up @@ -388,6 +388,7 @@ angular.module('pascalprecht.translate')
if (hasPart(name)) {
var wasActive = parts[name].isActive;
if (removeData) {
var $translate = $injector.get('$translate');
var cache = $translate.loaderCache();
if (typeof(cache) === 'string') {
// getting on-demand instance of loader
Expand Down

0 comments on commit 25f252c

Please sign in to comment.