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 npe when resolving fallback language for instant
Browse files Browse the repository at this point in the history
Relates #752
  • Loading branch information
knalli committed Nov 23, 2014
1 parent 5b4edd9 commit 7c09d89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/service/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ angular.module('pascalprecht.translate').provider('$translate', ['$STORAGE_KEY',
var getFallbackTranslationInstant = function (langKey, translationId, interpolateParams, Interpolator) {
var result, translationTable = $translationTable[langKey];

if (Object.prototype.hasOwnProperty.call(translationTable, translationId)) {
if (translationTable && Object.prototype.hasOwnProperty.call(translationTable, translationId)) {
Interpolator.setLocale(langKey);
result = Interpolator.interpolate(translationTable[translationId], interpolateParams);
Interpolator.setLocale($uses);
Expand Down

0 comments on commit 7c09d89

Please sign in to comment.