Skip to content

Commit

Permalink
Ignore pdfjs "page rendering canceled" errors, even in minified deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
edemaine committed Dec 20, 2023
1 parent 8318650 commit 43eb002
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/MessagePDF.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ WrappedMessagePDF = React.memo ({file}) ->
)
.catch (error) ->
## Ignore pdfjs's error when rendering gets canceled from page flipping
throw error unless error.name == 'RenderingCancelledException'
throw error unless error.name == 'RenderingCancelledException' or error.message.startsWith 'Rendering cancelled, page'
-> renderTask.cancel()
, [page, elementWidth, fit, inView]

Expand Down

0 comments on commit 43eb002

Please sign in to comment.