Change var to let, and use object destructuring, in a couple of previously class converted web/*.js files

Note that these files were among the first to be converted to ES6 classes, so it probably makes sense to do another pass to bring them inline with the most recent ES6 conversions.
This commit is contained in:
Jonas Jenwald 2017-06-30 12:55:22 +02:00
parent 699f3392e4
commit 614e8cf295
9 changed files with 113 additions and 118 deletions

View file

@ -103,9 +103,9 @@ class PDFFindBar {
}
updateUIState(state, previous, matchCount) {
var notFound = false;
var findMsg = '';
var status = '';
let notFound = false;
let findMsg = '';
let status = '';
switch (state) {
case FindState.FOUND:
@ -206,8 +206,8 @@ class PDFFindBar {
// wrapped). Here we detect and fix that.
this.bar.classList.remove('wrapContainers');
var findbarHeight = this.bar.clientHeight;
var inputContainerHeight = this.bar.firstElementChild.clientHeight;
let findbarHeight = this.bar.clientHeight;
let inputContainerHeight = this.bar.firstElementChild.clientHeight;
if (findbarHeight > inputContainerHeight) {
// The findbar is taller than the input container, which means that