From ffcd8aa1334438ef5bbc23e8f87cb9ce3c562ecd Mon Sep 17 00:00:00 2001 From: Charlie Kolb Date: Tue, 12 Nov 2024 15:55:42 +0100 Subject: [PATCH] Add comment --- .../src/components/Node/NodeCreator/composables/useActions.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/editor-ui/src/components/Node/NodeCreator/composables/useActions.ts b/packages/editor-ui/src/components/Node/NodeCreator/composables/useActions.ts index 1058ed2950d..92a5563d80d 100644 --- a/packages/editor-ui/src/components/Node/NodeCreator/composables/useActions.ts +++ b/packages/editor-ui/src/components/Node/NodeCreator/composables/useActions.ts @@ -219,6 +219,8 @@ export const useActions = () => { const { getByNameAndVersion } = getNodeTypes(); // We want to add a trigger if there are no triggers other than Manual Triggers + // Performance here should be fine as `getByNameAndVersion` fetches nodeTypes once in bulk + // and `every` aborts on first `false` const shouldAddChatTrigger = allNodes.every((node) => { const nodeType = getByNameAndVersion(node.type, node.typeVersion);