mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Access PDFViewerApplication.findBar
safely in more spots (PR 15831 follow-up)
Note that this patch is the result of code-inspection, and the code as written doesn't (currently) cause any bugs in e.g. the GeckoView PDF Viewer.
This commit is contained in:
parent
a83a8d7e4f
commit
b420bd8b20
1 changed files with 2 additions and 2 deletions
|
@ -2286,7 +2286,7 @@ function webViewerNamedAction(evt) {
|
|||
|
||||
case "Find":
|
||||
if (!PDFViewerApplication.supportsIntegratedFind) {
|
||||
PDFViewerApplication?.findBar.toggle();
|
||||
PDFViewerApplication.findBar?.toggle();
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2517,7 +2517,7 @@ function webViewerUpdateFindMatchesCount({ matchesCount }) {
|
|||
if (PDFViewerApplication.supportsIntegratedFind) {
|
||||
PDFViewerApplication.externalServices.updateFindMatchesCount(matchesCount);
|
||||
} else {
|
||||
PDFViewerApplication.findBar.updateResultsCount(matchesCount);
|
||||
PDFViewerApplication.findBar?.updateResultsCount(matchesCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue