fix the first 100 prefer-const errors

This commit is contained in:
Thomas Grainger 2017-05-03 00:40:39 +01:00
parent 0a3233d289
commit b365ce3195
No known key found for this signature in database
GPG key ID: 995EA0A029283160
10 changed files with 141 additions and 146 deletions

View file

@ -60,8 +60,8 @@ RecipeWaiter.prototype.initialiseOperationDragNDrop = function() {
}.bind(this));
Sortable.utils.on(recList, "touchend", function(e) {
let loc = e.changedTouches[0],
target = document.elementFromPoint(loc.clientX, loc.clientY);
const loc = e.changedTouches[0];
const target = document.elementFromPoint(loc.clientX, loc.clientY);
this.removeIntent = !recList.contains(target);
}.bind(this));
@ -276,8 +276,9 @@ RecipeWaiter.prototype.operationChildDblclick = function(e) {
* @returns {recipeConfig}
*/
RecipeWaiter.prototype.getConfig = function() {
let config = [], ingredients, ingList, disabled, bp, item,
operations = document.querySelectorAll("#rec-list li.operation");
const config = [];
let ingredients, ingList, disabled, bp, item;
const operations = document.querySelectorAll("#rec-list li.operation");
for (let i = 0; i < operations.length; i++) {
ingredients = [];
@ -402,8 +403,8 @@ RecipeWaiter.prototype.clearRecipe = function() {
* @param {event} e
*/
RecipeWaiter.prototype.dropdownToggleClick = function(e) {
let el = e.target,
button = el.parentNode.parentNode.previousSibling;
const el = e.target;
const button = el.parentNode.parentNode.previousSibling;
button.innerHTML = el.textContent + " <span class='caret'></span>";
this.ingChange();