Skip to content

Commit

Permalink
Only show links for which there are nodes in FlightResponseTabNetwork (
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarlagerlof committed May 21, 2024
1 parent 0a42b64 commit 5356856
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .changeset/silly-cameras-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@rsc-parser/core": patch
"@rsc-parser/embedded-example": patch
"@rsc-parser/chrome-extension": patch
"@rsc-parser/embedded": patch
"@rsc-parser/storybook": patch
"@rsc-parser/website": patch
---

Only show links for which there are nodes in FlightResponseTabNetwork
5 changes: 4 additions & 1 deletion packages/core/src/components/FlightResponseTabNetwork.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ function getLinks(chunks: Chunk[], id: string) {

walk(id);

return links;
// Only return links for which there are nodes
return links.filter((link) =>
chunks.find((chunk) => chunk.id === link.target),
);
}

export function FlightResponseTabNetwork({
Expand Down

0 comments on commit 5356856

Please sign in to comment.