From 97295f67f0f8509ac6ba0d4ce38ce12582dff074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Tue, 6 Jun 2023 14:01:26 +0200 Subject: [PATCH] fix(editor): Remove explicit parameter name scanning for code editors (#6390) The correct value to display in an editor is already passed in to `ParameterInput`. We do not need to scan for the correct parameter name again. This also fixes the issue of us accidentally using `jsCode` as the parameter name in the Code node when the language is set to Python. --- .../src/components/ParameterInput.vue | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/packages/editor-ui/src/components/ParameterInput.vue b/packages/editor-ui/src/components/ParameterInput.vue index cbd4aa5c50..3483beb70a 100644 --- a/packages/editor-ui/src/components/ParameterInput.vue +++ b/packages/editor-ui/src/components/ParameterInput.vue @@ -87,7 +87,7 @@ o.name); }, - nodeType(): INodeTypeDescription | null { - if (!this.node) return null; - return this.nodeTypesStore.getNodeType(this.node.type, this.node.typeVersion); - }, - editorContent(): string | undefined { - if (!this.nodeType) { - return; - } - const editorProp = this.nodeType.properties.find( - (p) => p.typeOptions?.editor === (this.editorType as string), - ); - if (!editorProp) { - return; - } - return this.node.parameters[editorProp.name] as string; - }, }, methods: { isRemoteParameterOption(option: INodePropertyOptions) {