Merge pull request #4821 from yurydelendik/fix-loadfontregr

Fixes regression in the cleanup
This commit is contained in:
Yury Delendik 2014-05-20 22:38:39 -05:00
commit d2da73b8c4

View File

@ -511,9 +511,10 @@ var Catalog = (function CatalogClosure() {
this.fontCache.forEach(function (promise) { this.fontCache.forEach(function (promise) {
promises.push(promise); promises.push(promise);
}); });
return Promise.all(promises).then(function (fonts) { return Promise.all(promises).then(function (translatedFonts) {
for (var i = 0, ii = fonts.length; i < ii; i++) { for (var i = 0, ii = translatedFonts.length; i < ii; i++) {
delete fonts[i].translated; var font = translatedFonts[i].dict;
delete font.translated;
} }
this.fontCache.clear(); this.fontCache.clear();
}.bind(this)); }.bind(this));