Merge pull request #14443 from Snuffleupagus/issue-14442

Prevent run-time errors in `BaseViewer` when it's falling back to `SimpleLinkService` (issue 14442, PR 14295 follow-up)
This commit is contained in:
Tim van der Meij 2022-01-12 20:09:14 +01:00 committed by GitHub
commit ea57ef116e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;