Prevent run-time errors in BaseViewer when it's falling back to SimpleLinkService (issue 14442, PR 14295 follow-up)

This commit is contained in:
Jonas Jenwald 2022-01-12 17:04:51 +01:00
parent 236c8d4786
commit 8286066372

View File

@ -1541,7 +1541,7 @@ class BaseViewer {
if (!pageView.pdfPage) {
pageView.setPdfPage(pdfPage);
}
if (!this.linkService._cachedPageNumber(pdfPage.ref)) {
if (!this.linkService._cachedPageNumber?.(pdfPage.ref)) {
this.linkService.cachePageRef(pageView.id, pdfPage.ref);
}
return pdfPage;