From cd733d56c00ff3d42f5eff9be04999ed36b14beb Mon Sep 17 00:00:00 2001 From: liuxiang Date: Sun, 7 Aug 2022 16:51:26 +0800 Subject: [PATCH] render cancel catch undifined --- src/pdfjsWrapper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pdfjsWrapper.js b/src/pdfjsWrapper.js index 67f2962..9b5df2a 100644 --- a/src/pdfjsWrapper.js +++ b/src/pdfjsWrapper.js @@ -193,7 +193,8 @@ export default function(PDFJS) { if ( canceling ) return; canceling = true; - pdfRender.cancel().catch(function(err) { + pdfRender.cancel(); + pdfRender.promise.catch(function(err) { emitEvent('error', err); }); return;