GoJS 3 Node findLinksInto and findLinksOutOf return all links

Hi,
with GoJS 3 it seems that the node functions findLinksOutOf and findLinksInto return the complete linksConnected collection instead of the filtered collection.

I have a node with 2 links into and 3 links out of.
Both findLinksOutOf and findLinksInto return the same iterator with a count of 5.

Really? It seems to work correctly in our regression tests and in samples such as: https://gojs.net/latest/samples/navigation.html

Here’s some code that I just tried, which confirms the correct behavior:

myDiagram.nodeTemplate =
  new go.Node("Auto", {
      click: (e, node) => {
        console.log("in")
        node.findLinksInto().each(l => console.log(l.data.from, l.data.to));
        console.log("out")
        node.findLinksOutOf().each(l => console.log(l.data.from, l.data.to));
      }
    })
    .add(
      new go.Shape({ fill: "white" })
        .bind("fill", "color"),
      new go.TextBlock({ margin: 8 })
        .bind("text")
    );

So I cannot explain the behavior that you are getting. Could you help us reproduce the problem, please?

I inserted this code into our template and it works, the functions return the correctly filtered collection but it does not when we find and access the node programmatically .

This is the code in question.

p is a go.Part
    const node = diagram.findNodeForData(p!.data)!;
    console.log(node);
    console.log('all links: ', node.findLinksConnected().map(link => link.data!));
    console.log('in links: ', node.findLinksInto().map(link => link.data!));
    console.log('out links: ', node.findLinksOutOf().map(link => link.data!));

Ok. I found the source of the problem.
The code in my last post works just fine. (One of these days where things sometimes work and sometimes not, or at least they appear to be)

This reproduces the wrong and the correct collection output .
It appears to be the spread into a new array operation causes the issue.

                const node = diagram.findNodeForData(p!.data)!;
                console.log('all links: ', node.findLinksConnected());
                console.log('in links: ', node.findLinksInto());
                console.log('in links. Wrong: ', [...node.findLinksInto()]);
                console.log('out links: ', node.findLinksOutOf());
                console.log('out links. Wrong: ', [...node.findLinksOutOf()]);

Thanks for reporting, this will be fixed in the next release, probably today or Monday.

Any news on this?

We’re waiting a few more days possibly before the next release.

In the meantime it should be possible to use something like

const arr = [];
node.findLinksInto().each((l) => { arr.push(l) })

To gather all relevant links as a workaround

GoJS 3.0.1 has been released, which should fix this issue.

I just saw the release. Thanks for the effort!
Will try the updated version tomorrow.