summaryrefslogtreecommitdiff
path: root/pages/index.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2022-09-27 16:18:11 +0200
committerThomas F. K. Jorna <[email protected]>2022-09-27 16:18:11 +0200
commit1936250b99b8747d841edd83002ed20ec12aa793 (patch)
treeaf9fdc3db50ecbc61036d88c81eeea3703ff17cc /pages/index.tsx
parent3f28da87e32790a0f5f92ce7071bceb92f4a1aa5 (diff)
fix: type-error
Diffstat (limited to 'pages/index.tsx')
-rw-r--r--pages/index.tsx4
1 files changed, 3 insertions, 1 deletions
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: