mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
[Regression] Ensure that PDFFindBar.updateResultsCount
doesn't throw when the viewer is closed, by providing proper default values
The error can be reproduced by opening any file in the viewer, and then running `PDFViewerApplication.close()` in the console.
This commit is contained in:
parent
bc5111d152
commit
11c8e33ed1
1 changed files with 1 additions and 1 deletions
|
@ -153,7 +153,7 @@ class PDFFindBar {
|
|||
this.updateResultsCount(matchesCount);
|
||||
}
|
||||
|
||||
updateResultsCount({ current, total, }) {
|
||||
updateResultsCount({ current = 0, total = 0, } = {}) {
|
||||
if (!this.findResultsCount) {
|
||||
return; // No UI control is provided.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue