diff --git a/packages/editor-ui/src/components/NodeSettings.vue b/packages/editor-ui/src/components/NodeSettings.vue index 6b649decb4..23c8acfb33 100644 --- a/packages/editor-ui/src/components/NodeSettings.vue +++ b/packages/editor-ui/src/components/NodeSettings.vue @@ -248,7 +248,7 @@ export default defineComponent({ return ''; }, nodeTypeDescription(): string { - if (this.nodeType && this.nodeType.description) { + if (this.nodeType?.description) { const shortNodeType = this.$locale.shortNodeType(this.nodeType.name); return this.$locale.headerText({ @@ -551,7 +551,7 @@ export default defineComponent({ const { [lastNamePart]: removedNodeValue, ...remainingNodeValues } = tempValue; tempValue = remainingNodeValues; - if (isArray === true && (tempValue as INodeParameters[]).length === 0) { + if (isArray && (tempValue as INodeParameters[]).length === 0) { // If a value from an array got delete and no values are left // delete also the parent lastNamePart = nameParts.pop(); @@ -717,8 +717,8 @@ export default defineComponent({ this.workflowsStore.setNodeParameters(updateInformation); - this.updateNodeParameterIssues(node, nodeType); - this.updateNodeCredentialIssues(node); + this.updateNodeParameterIssuesByName(node.name); + this.updateNodeCredentialIssuesByName(node.name); } } else if (parameterData.name.startsWith('parameters.')) { // A node parameter changed @@ -800,8 +800,8 @@ export default defineComponent({ oldNodeParameters, }); - this.updateNodeParameterIssues(node, nodeType); - this.updateNodeCredentialIssues(node); + this.updateNodeParameterIssuesByName(node.name); + this.updateNodeCredentialIssuesByName(node.name); this.$telemetry.trackNodeParametersValuesChange(nodeType.name, parameterData); } else { // A property on the node itself changed diff --git a/packages/editor-ui/src/mixins/nodeHelpers.ts b/packages/editor-ui/src/mixins/nodeHelpers.ts index 073c5f5e23..ad517e4ad4 100644 --- a/packages/editor-ui/src/mixins/nodeHelpers.ts +++ b/packages/editor-ui/src/mixins/nodeHelpers.ts @@ -181,6 +181,14 @@ export const nodeHelpers = defineComponent({ } }, + updateNodeCredentialIssuesByName(name: string): void { + const node = this.workflowsStore.getNodeByName(name); + + if (node) { + this.updateNodeCredentialIssues(node); + } + }, + // Updates the credential-issues of the node updateNodeCredentialIssues(node: INodeUi): void { const fullNodeIssues: INodeIssues | null = this.getNodeCredentialIssues(node); @@ -197,6 +205,14 @@ export const nodeHelpers = defineComponent({ }); }, + updateNodeParameterIssuesByName(name: string): void { + const node = this.workflowsStore.getNodeByName(name); + + if (node) { + this.updateNodeParameterIssues(node); + } + }, + // Updates the parameter-issues of the node updateNodeParameterIssues(node: INodeUi, nodeType?: INodeTypeDescription): void { if (nodeType === undefined) {