[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:
Jonas Jenwald 2018-09-10 16:02:44 +02:00
parent bc5111d152
commit 11c8e33ed1

View File

@ -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.
}