From 2bb63fb7066cb64ac8b2d5873e86f46eb5caef61 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> Date: Thu, 22 Sep 2022 12:31:49 +0200 Subject: [PATCH] fix: fix expressions bug with numbers and booleans (#4169) --- packages/editor-ui/src/components/ParameterInput.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/editor-ui/src/components/ParameterInput.vue b/packages/editor-ui/src/components/ParameterInput.vue index d741a17995415..392f15f0dc40e 100644 --- a/packages/editor-ui/src/components/ParameterInput.vue +++ b/packages/editor-ui/src/components/ParameterInput.vue @@ -935,15 +935,17 @@ export default mixins( } else if (command === 'openExpression') { this.expressionEditDialogVisible = true; } else if (command === 'addExpression') { - if (this.parameter.type === 'number' || this.parameter.type === 'boolean') { - this.valueChanged({ value: `={{${this.value}}}`, mode: this.value.mode }); - } else if (this.isResourceLocatorParameter) { + if (this.isResourceLocatorParameter) { if (isResourceLocatorValue(this.value)) { this.valueChanged({ value: `=${this.value.value}`, mode: this.value.mode }); } else { this.valueChanged({ value: `=${this.value}`, mode: '' }); } - } else { + } + else if (this.parameter.type === 'number' || this.parameter.type === 'boolean') { + this.valueChanged(`={{${this.value}}}`); + } + else { this.valueChanged(`=${this.value}`); }