Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editor): Console error in ActionsMode when searching for action and pressing enter (no-changelog) #9292

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,10 @@ function onSelected(actionCreateElement: INodeCreateElement) {
);

if (isPlaceholderTriggerAction && isTriggerRootView.value) {
const actionNode = actions.value[0].key;

emit('nodeTypeSelected', [actionData.key as string, actionNode]);
const actionNode = actions.value[0]?.key;
if (actionNode) emit('nodeTypeSelected', [actionData.key as string, actionNode]);
} else if (
actionData.key === OPEN_AI_NODE_TYPE &&
actionData?.key === OPEN_AI_NODE_TYPE &&
(actionData?.value as IDataObject)?.resource === 'assistant' &&
(actionData?.value as IDataObject)?.operation === 'message'
) {
Expand Down Expand Up @@ -200,7 +199,8 @@ function addHttpNode() {
emit('nodeTypeSelected', [HTTP_REQUEST_NODE_TYPE]);
if (telemetry) setAddedNodeActionParameters(updateData);

const app_identifier = actions.value[0].key;
const app_identifier = actions.value[0]?.key;
if (!app_identifier) return;
void useExternalHooks().run('nodeCreateList.onActionsCustmAPIClicked', {
app_identifier,
});
Expand Down