Ensure that PDFViewerApplication.error outputs proper messages in FIREFOX/MOZCENTRAL builds

*It appears that this accidentally broke with PR 8394.*

Currently, the following will be printed in the console:
```
An error occurred while loading the PDF.
[object Promise],[object Promise]
```

With this patch we'll again get proper output, e.g. something with this format:
```
An error occurred while loading the PDF.
PDF.js v? (build: ?)
Message: unknown encryption method
```
This commit is contained in:
Jonas Jenwald 2017-08-28 13:49:40 +02:00
parent f54dfc63dc
commit 028d7c0950

View File

@ -841,7 +841,9 @@ let PDFViewerApplication = {
errorMoreInfo.value = parts.join('\n');
});
} else {
console.error(message + '\n' + moreInfoText);
Promise.all(moreInfoText).then((parts) => {
console.error(message + '\n' + parts.join('\n'));
});
this.fallback();
}
},