fix: prevent variable being declared globally

Fixes #238
master
Rex Tsou 5 years ago
parent b59a19f769
commit df8c260e24

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

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

Loading…
Cancel
Save