From 43eb00252229d7358a1c38d90123611381dc9600 Mon Sep 17 00:00:00 2001 From: Erik Demaine Date: Wed, 20 Dec 2023 11:51:35 -0500 Subject: [PATCH] Ignore pdfjs "page rendering canceled" errors, even in minified deploy --- client/MessagePDF.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/MessagePDF.coffee b/client/MessagePDF.coffee index 8894821..e1d5565 100644 --- a/client/MessagePDF.coffee +++ b/client/MessagePDF.coffee @@ -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]