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

Commit

Permalink
fix(service): fix an issue resolving after missing translations
Browse files Browse the repository at this point in the history
Impacts (detailed): If a loading of translations fails (i.e. file does
not exist), the languageId was accidently resolved as a (failed)
translation result. Both preferredLanguage as well as determinePreferredLanguage
(internally preferredLanguage) were been affected.

Solves #920
  • Loading branch information
knalli committed Apr 13, 2015
1 parent ee253bc commit a13899f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/service/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,9 @@ angular.module('pascalprecht.translate').provider('$translate', ['$STORAGE_KEY',
// We can just translate.
determineTranslation(translationId, interpolateParams, interpolationId, defaultTranslationText).then(deferred.resolve, deferred.reject);
} else {
promiseToWaitFor.then(function () {
promiseToWaitFor['finally'](function () {
determineTranslation(translationId, interpolateParams, interpolationId, defaultTranslationText).then(deferred.resolve, deferred.reject);
}, deferred.reject);
});
}
return deferred.promise;
};
Expand Down

0 comments on commit a13899f

Please sign in to comment.