Commit 1af5aad9 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

Update index.js

parent 23449a31
......@@ -153,7 +153,7 @@ function format(response) {
const time = moment(value.DateReleve, moment.ISO_8601)
return {
// Add if/else to not substract null value (typeagregat T)
load: value.ValeurIndex - response.resultatRetour[index].ValeurIndex,
load: value.TypeAgregat === 'T' ? null : value.ValeurIndex - response.resultatRetour[index].ValeurIndex,
year: parseInt(time.format('YYYY')),
month: parseInt(time.format('M')),
day: parseInt(time.format('D')),
......
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