API Data Fetcher bot Bug Fixed. Timestamp record property expected only as Number.

This commit is contained in:
Luis Fernando Molina committed 2021-06-02 14:11:15 +02:00
1 parent 3b36eda278
commit fab078f38f
1 file changed
+7 -1
@@ -324,7 +324,7 @@ exports.newSuperalgosFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = func
}
doHeartBeat()
function doHeartBeat() {
/* Telling the world we are alive and doing well */
let currentDateString =
@@ -536,6 +536,12 @@ exports.newSuperalgosFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = func
element.end <= outputElement.end) {
aggregateElements()
}
/*
If the Timestamp is not a numeric value, then we will convert it to it.
*/
if (element.timestamp !== undefined && isNaN(element.timestamp)) {
element.timestamp = (new Date(element.timestamp)).valueOf()
}
/*
Here we discard all the elements out of range based on the timestamp propertiy of
the Data Dependency element.