Skip to content
Snippets Groups Projects
Commit 547b76f2 authored by Bhabesh Bhabani Mukhopadhyay's avatar Bhabesh Bhabani Mukhopadhyay
Browse files

Re-initiate JSON array for new weather stations

Initiate the JSON array before data fetch from ajax to make sure about deal with fresh new data
parent 0a7df4a5
Branches
No related tags found
No related merge requests found
......@@ -377,14 +377,13 @@
var TM_NON_NEGATIVE = 0;
var counter = undefined;
console.log('I hv data');
if($.trim(data))
{
for (var i=0; i<data.length; i++)
{
var strStartDateDtPicker = JSON.stringify(getStrConvertedDate(data[i].timeMeasured)).substring(1,11);
if(strStartDateDtPicker===$('#idTxtDateInput').val())
{
counter = 0;
......@@ -392,7 +391,6 @@
}
if(typeof counter === "undefined")
{
break;
}
else
......@@ -527,6 +525,7 @@
data : jsonParamUrlDataHourly,
//async : false,
success : function (data) {
resultHeatSumDailyData = []; /* Re initialize */
if($.trim(data))
{
$('#idDivHeatSum').show();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment