1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #16424 from Snuffleupagus/core-optional-chaining

Introduce more optional chaining in the `src/core/` folder
This commit is contained in:
Tim van der Meij 2023-05-18 12:40:08 +02:00 committed by GitHub
commit ac8032628b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 90 additions and 137 deletions

View file

@ -2317,8 +2317,8 @@ function webViewerPageRendered({ pageNumber, error }) {
const thumbnailView = PDFViewerApplication.pdfThumbnailViewer?.getThumbnail(
/* index = */ pageNumber - 1
);
if (pageView && thumbnailView) {
thumbnailView.setImage(pageView);
if (pageView) {
thumbnailView?.setImage(pageView);
}
}