Commit d4aebc0e authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 51e1d678
...@@ -56,7 +56,7 @@ async function run() { ...@@ -56,7 +56,7 @@ async function run() {
let types = adder[z].type let types = adder[z].type
for (let l = 0; l < types.length; l++) for (let l = 0; l < types.length; l++)
add(adder[i].total, adder[z].dates, types[l]) add(adder[i].total, null, types[l])
} }
} }
...@@ -97,11 +97,15 @@ function add(total, dates, type) { ...@@ -97,11 +97,15 @@ function add(total, dates, type) {
for (let i = 0; i < adder.length; i++) for (let i = 0; i < adder.length; i++)
if (adder[i].total === total) { if (adder[i].total === total) {
found = true found = true
if ( dates !==null)
{
for (let z = 0; z < dates.length; z++) for (let z = 0; z < dates.length; z++)
adder[i].dates.push(dates[z]) adder[i].dates.push(dates[z])
adder[i].countDay = adder[i].dates.length adder[i].countDay = adder[i].dates.length
}
if (typeof type !=="undefined") if (typeof type !=="undefined")
adder[i].type.push(type) adder[i].type.push(type)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment