Protect pdf-js-wrapper from NPE error (#5658)

GitOrigin-RevId: 55bdc27afb7dd9ea55751ae0bd89a2498f9f2ce6
This commit is contained in:
Miguel Serrano 2021-11-03 15:29:54 +01:00 committed by Copybot
parent b90b7c92ac
commit a5fd363938

View file

@ -94,7 +94,7 @@ export default class PDFJSWrapper {
})
.catch(error => {
if (this.loadDocumentTask) {
if (error.name !== 'MissingPDFException') {
if (!error || error.name !== 'MissingPDFException') {
captureMessage(`pdf preview error ${error}`)
}