Update NodesWarnings.js
This commit is contained in:
1 parent
c83c0a443a
commit
66d4369a14
1 file changed
+16
-6
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user