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 lost of data in async loader / error in runtime
Browse files Browse the repository at this point in the history
Accidently, a promise handler for loading translations transform the data into `undefined` internally resulting into type/npe at runtime.

Relates #1471
  • Loading branch information
knalli committed Jun 26, 2016
1 parent 4c908ee commit 5ee0c3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/service/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,7 @@ function $translate($STORAGE_KEY, $windowProvider, $translateSanitizationProvide
if (!$translationTable[key] && $loaderFactory && !langPromises[key]) {
langPromises[key] = loadAsync(key).then(function (translation) {
translations(translation.key, translation.table);
return translation;
});
}
};
Expand Down Expand Up @@ -2080,6 +2081,7 @@ function $translate($STORAGE_KEY, $windowProvider, $translateSanitizationProvide
useLanguage($uses);
}
resolve();
return data;
};
oneTranslationsLoaded.displayName = 'refreshPostProcessor';

Expand Down

0 comments on commit 5ee0c3e

Please sign in to comment.