mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add comment on RED.nodes.getNodeLinkCount api
This commit is contained in:
parent
c27dd336d9
commit
b1a706f811
@ -2717,6 +2717,10 @@ RED.nodes = (function() {
|
||||
return [];
|
||||
},
|
||||
getNodeLinkCount: function(id,portType,index) {
|
||||
// We *could* just let callers use `getNodeLinks` and get the
|
||||
// the length for themselves. However, that function creates
|
||||
// a clone of the array - which is needless work if all you
|
||||
// want is the length
|
||||
if (nodeLinks[id]) {
|
||||
if (portType === 1) {
|
||||
return nodeLinks[id].inCount[index] || 0
|
||||
|
Loading…
Reference in New Issue
Block a user