diff --git a/Projects/Superalgos/Spaces/Charting-Space/Plotting/NodesWarnings.js b/Projects/Superalgos/Spaces/Charting-Space/Plotting/NodesWarnings.js index 4f09e718c..56d09904f 100644 --- a/Projects/Superalgos/Spaces/Charting-Space/Plotting/NodesWarnings.js +++ b/Projects/Superalgos/Spaces/Charting-Space/Plotting/NodesWarnings.js @@ -8,15 +8,15 @@ function newNodesWarnings() { initialize: initialize, finalize: finalize } - + return thisObject function finalize() { - + } function initialize() { - + } function onRecordChange(currentRecord) { @@ -25,9 +25,19 @@ function newNodesWarnings() { if (array === undefined) { return } for (let i = 0; i < array.length; i++) { let arrayItem = array[i] - let nodeId = arrayItem[0] - let value = arrayItem[1] - applyValue(nodeId, value) + let nodeIdArray = arrayItem[0] + /* We migth receive here and array of node Ids. If we dont, we receive at least one node id*/ + if (Array.isArray(nodeIdArray) === true) { + for (let j = 0; j < nodeIdArray.length; j++) { + let nodeId = nodeIdArray[j] + let value = arrayItem[1] + applyValue(nodeId, value) + } + } else { + let nodeId = arrayItem[0] + let value = arrayItem[1] + applyValue(nodeId, value) + } } }