diff --git a/.vs/AAOlivia-Plotter/v15/.suo b/.vs/AAOlivia-Plotter/v15/.suo index 218bda599..77b1e8b0a 100644 Binary files a/.vs/AAOlivia-Plotter/v15/.suo and b/.vs/AAOlivia-Plotter/v15/.suo differ diff --git a/Candles.js b/Candles.js index c93ce7d5b..3d91e94a9 100644 --- a/Candles.js +++ b/Candles.js @@ -391,12 +391,15 @@ let lowerEnd = leftDate.valueOf(); let upperEnd = rightDate.valueOf(); - if (candles[0].begin > lowerEnd || candles[candles.length - 1].end < upperEnd) { + if (candles.length > 0) { - setTimeout(recalculate, 2000); + if (candles[0].begin > lowerEnd || candles[candles.length - 1].end < upperEnd) { - //console.log("File missing while calculating candles, scheduling a recalculation in 2 seconds."); + setTimeout(recalculate, 2000); + //console.log("File missing while calculating candles, scheduling a recalculation in 2 seconds."); + + } } //console.log("Olivia > recalculateUsingDailyFiles > total candles generated : " + candles.length); diff --git a/Volumes.js b/Volumes.js index d36d6f85f..63fe74379 100644 --- a/Volumes.js +++ b/Volumes.js @@ -295,12 +295,15 @@ let lowerEnd = leftDate.valueOf(); let upperEnd = rightDate.valueOf(); - if (volumes[0].begin > lowerEnd || volumes[volumes.length - 1].end < upperEnd) { + if (volumes.length > 0) { - setTimeout(recalculate, 2000); + if (volumes[0].begin > lowerEnd || volumes[volumes.length - 1].end < upperEnd) { - //console.log("File missing while calculating volumes, scheduling a recalculation in 2 seconds."); + setTimeout(recalculate, 2000); + //console.log("File missing while calculating volumes, scheduling a recalculation in 2 seconds."); + + } } //console.log("Olivia > recalculateUsingDailyFiles > total volumes generated : " + volumes.length);