From a168f3294caadc2416627b6fea2f65c88c61f335 Mon Sep 17 00:00:00 2001 From: Joshua Carter Date: Tue, 4 Jun 2024 23:35:50 -0700 Subject: [PATCH] Correct error, support no editing node in new node-editor.tsx state call --- .../flow-client/src/app/components/editor/node-editor.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flow-client/src/app/components/editor/node-editor.tsx b/packages/flow-client/src/app/components/editor/node-editor.tsx index 4ffff83..3e55169 100644 --- a/packages/flow-client/src/app/components/editor/node-editor.tsx +++ b/packages/flow-client/src/app/components/editor/node-editor.tsx @@ -190,7 +190,9 @@ export const NodeEditor = ({}: NodeEditorProps) => { selectFlowNodeById(state, editing?.id ?? '') ) as FlowNodeEntity; const editingNodeEntity = useAppSelector(state => - flowLogic.node.selectPaletteNodeByFlowNode(state, editingNode) + editingNode + ? flowLogic.node.selectPaletteNodeByFlowNode(state, editingNode) + : null ); const { propertiesForm } = useAppSelector(flowLogic.node.editor.selectEditorState) ?? {};