mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Remove the PDFPageView.error
property, and simply include Errors in the "pagerendered" event instead
The way that rendering errors are handled in `PDFPageView` is *very* old, and predates e.g. the introduction of the `EventBus` by several years. Hence we should be able to simplify things a bit here, by including the Error (when it exists) in the "pagerendered" event and thus avoid having to reach into `PDFPageView` for it.
This commit is contained in:
parent
7b15094cdf
commit
9efc1784b2
3 changed files with 12 additions and 10 deletions
|
@ -317,7 +317,7 @@ class PDFThumbnailView {
|
|||
this.renderingState = RenderingStates.RUNNING;
|
||||
|
||||
const renderCapability = createPromiseCapability();
|
||||
const finishRenderTask = error => {
|
||||
const finishRenderTask = (error = null) => {
|
||||
// The renderTask may have been replaced by a new one, so only remove
|
||||
// the reference to the renderTask if it matches the one that is
|
||||
// triggering this callback.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue