mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix: Correct connections in SentimentAnalysis and TextClassifier (#14155)
This commit is contained in:
@@ -24,7 +24,7 @@ const configuredOutputs = (parameters: INodeParameters, defaultCategories: strin
|
|||||||
const categories = (options?.categories as string) ?? defaultCategories;
|
const categories = (options?.categories as string) ?? defaultCategories;
|
||||||
const categoriesArray = categories.split(',').map((cat) => cat.trim());
|
const categoriesArray = categories.split(',').map((cat) => cat.trim());
|
||||||
|
|
||||||
const ret = categoriesArray.map((cat) => ({ type: NodeConnectionTypes.Main, displayName: cat }));
|
const ret = categoriesArray.map((cat) => ({ type: 'main', displayName: cat }));
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ const configuredOutputs = (parameters: INodeParameters) => {
|
|||||||
const categories = ((parameters.categories as IDataObject)?.categories as IDataObject[]) ?? [];
|
const categories = ((parameters.categories as IDataObject)?.categories as IDataObject[]) ?? [];
|
||||||
const fallback = (parameters.options as IDataObject)?.fallback as string;
|
const fallback = (parameters.options as IDataObject)?.fallback as string;
|
||||||
const ret = categories.map((cat) => {
|
const ret = categories.map((cat) => {
|
||||||
return { type: NodeConnectionTypes.Main, displayName: cat.category };
|
return { type: 'main', displayName: cat.category };
|
||||||
});
|
});
|
||||||
if (fallback === 'other') ret.push({ type: NodeConnectionTypes.Main, displayName: 'Other' });
|
if (fallback === 'other') ret.push({ type: 'main', displayName: 'Other' });
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user