From defad5406277d2e2d20a4b84c68a44ea3839cf5a Mon Sep 17 00:00:00 2001 From: TonProtofy Date: Mon, 18 Nov 2024 20:59:15 +0100 Subject: [PATCH] Update ODrive component title and adjust check condition for nodeData --- packages/protodevice/src/nodes/ODrive.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/protodevice/src/nodes/ODrive.tsx b/packages/protodevice/src/nodes/ODrive.tsx index 381500a09..9e21a068c 100644 --- a/packages/protodevice/src/nodes/ODrive.tsx +++ b/packages/protodevice/src/nodes/ODrive.tsx @@ -12,7 +12,7 @@ const ODrive = ({ node = {}, nodeData = {}, children, color }: any) => { }, ] as Field[] return ( - + ) @@ -23,7 +23,7 @@ export default { type: 'CallExpression', category: "actuators", keywords: ["brushless", "motor","driver", "ODrive", "device"], - check: (node, nodeData) => node.type == "CallExpression" && nodeData.to?.startsWith('odrive'), + check: (node, nodeData) => node.type == "CallExpression" && nodeData.to == 'odrive', getComponent: (node, nodeData, children) => , getInitialData: () => { return { to: 'odrive', "param-1": { value: "", kind: "StringLiteral" }, "param-2": { value: "", kind: "StringLiteral" }}} } \ No newline at end of file