Have to check for both undefined and null to prevent exceptions from stopping the trading task.

This commit is contained in:
Steve Langridge committed 2021-03-30 12:26:03 +02:00
1 parent 43312c05e6
commit 9980cf637e
1 file changed
+1 -1
@@ -195,7 +195,7 @@ exports.newSuperalgosBotModulesTradingRecords = function (processIndex) {
from its value property.
*/
value = targetNode.value
if (value !== undefined) {
if (value !== undefined && value !== null) {
if (recordProperty.config.decimals !== undefined) {
try {
value = Number(value.toFixed(recordProperty.config.decimals))