From 1936250b99b8747d841edd83002ed20ec12aa793 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Tue, 27 Sep 2022 16:18:11 +0200 Subject: fix: type-error --- pages/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pages') diff --git a/pages/index.tsx b/pages/index.tsx index 75b33d3..8770283 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -467,8 +467,10 @@ export function GraphPage() { break } case 'change-local-graph': { + const node = nodeByIdRef.current[message.data.id as string] + if (!node) break console.log(message) - handleLocal(nodeByIdRef.current[message.data.id as string], message.data.manipulation) + handleLocal(node, message.data.manipulation) break } default: -- cgit v1.2.3