1
0
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:
Nick O'Leary 2022-01-12 18:04:53 +00:00
parent c27dd336d9
commit b1a706f811
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -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