fix: Remove Request Options from sub nodes (no-changelog) (#9853)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -25,18 +25,6 @@ describe('useNodeType()', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('isSubNodeType', () => {
|
||||
it('identifies sub node type correctly', () => {
|
||||
const nodeTypeOption = {
|
||||
name: 'testNodeType',
|
||||
outputs: ['Main', 'Other'],
|
||||
} as unknown as SimplifiedNodeType;
|
||||
const { isSubNodeType } = useNodeType({ nodeType: nodeTypeOption });
|
||||
|
||||
expect(isSubNodeType.value).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isMultipleOutputsNodeType', () => {
|
||||
it('identifies multiple outputs node type correctly', () => {
|
||||
const nodeTypeOption = {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { computed, unref } from 'vue';
|
||||
import type { INodeTypeDescription } from 'n8n-workflow';
|
||||
import type { INodeUi, SimplifiedNodeType } from '@/Interface';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { NodeConnectionType, NodeHelpers } from 'n8n-workflow';
|
||||
import { NodeHelpers } from 'n8n-workflow';
|
||||
|
||||
export function useNodeType(
|
||||
options: {
|
||||
@@ -26,15 +26,7 @@ export function useNodeType(
|
||||
return null;
|
||||
});
|
||||
|
||||
const isSubNodeType = computed(() => {
|
||||
if (!nodeType.value?.outputs || typeof nodeType.value?.outputs === 'string') {
|
||||
return false;
|
||||
}
|
||||
const outputTypes = NodeHelpers.getConnectionTypes(nodeType.value?.outputs);
|
||||
return outputTypes
|
||||
? outputTypes.filter((output) => output !== NodeConnectionType.Main).length > 0
|
||||
: false;
|
||||
});
|
||||
const isSubNodeType = computed(() => NodeHelpers.isSubNodeType(nodeType.value));
|
||||
|
||||
const isMultipleOutputsNodeType = computed(() => {
|
||||
const outputs = nodeType.value?.outputs;
|
||||
|
||||
Reference in New Issue
Block a user