Merge pull request #10056 from Snuffleupagus/matchesCount-viewer-close

[Regression] Ensure that `PDFFindBar.updateResultsCount` doesn't throw when the viewer is closed, by providing proper default values
This commit is contained in:
Tim van der Meij 2018-09-11 00:27:55 +02:00 committed by GitHub
commit bf368f3a32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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