Merge pull request #257 from akccakcctw/fix/prevent-variable-being-declared-globally

fix: prevent variable being declared globally
master
Mike Bryant 4 years ago committed by GitHub
commit 7b0b82d2fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -882,8 +882,8 @@ class Predictor {
}); });
let global_min_max = []; let global_min_max = [];
for (var day = 0; day < 14; day++) { for (let day = 0; day < 14; day++) {
prices = { const prices = {
min: 999, min: 999,
max: 0, max: 0,
} }

@ -208,9 +208,8 @@ const getPricesFromQuery = function (param) {
}; };
const getPreviousFromQuery = function () { const getPreviousFromQuery = function () {
/* Check if valid prices are entered. Exit immediately if not. */ /* Check if valid prices are entered. Exit immediately if not. */
prices = getPricesFromQuery("prices"); const prices = getPricesFromQuery("prices");
if (prices == null) { if (prices == null) {
return null; return null;
} }

Loading…
Cancel
Save