summaryrefslogtreecommitdiff
path: root/pages/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'pages/index.tsx')
-rw-r--r--pages/index.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/index.tsx b/pages/index.tsx
index 97f76af..69885e7 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -452,7 +452,7 @@ export const Graph = function (props: GraphProps) {
const previouslyHighlightedLinks = useMemo(
() => linksByNodeId[lastHoverNode.current?.id!] ?? [],
- [hoverNode],
+ [JSON.stringify(hoverNode), lastHoverNode.current],
)
const previouslyHighlightedNodes = useMemo(
@@ -463,7 +463,7 @@ export const Graph = function (props: GraphProps) {
...previouslyHighlightedLinks.flatMap((link) => [link.source, link.target]),
].map((nodeId) => [nodeId, {}]),
),
- [hoverNode, previouslyHighlightedLinks, lastHoverNode.current],
+ [JSON.stringify(hoverNode), previouslyHighlightedLinks, lastHoverNode.current],
)
const getNodeColorById = (id: string) => {