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

Commit

Permalink
fix(service): do not try to load a predefined fallback language
Browse files Browse the repository at this point in the history
Solves #981
  • Loading branch information
knalli committed Apr 13, 2015
1 parent 657ed8a commit 3be14df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/service/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,10 @@ angular.module('pascalprecht.translate').provider('$translate', ['$STORAGE_KEY',
return translation;
};
for (var i = 0, len = $fallbackLanguage.length; i < len; i++) {
langPromises[$fallbackLanguage[i]] = loadAsync($fallbackLanguage[i]).then(processAsyncResult);
var fallbackLanguageId = $fallbackLanguage[i];
if (!$translationTable[fallbackLanguageId]) {
langPromises[fallbackLanguageId] = loadAsync(fallbackLanguageId).then(processAsyncResult);
}
}
}
}
Expand Down

0 comments on commit 3be14df

Please sign in to comment.