Skip to content

Commit

Permalink
fix: fix expressions bug with numbers and booleans (n8n-io#4169)
Browse files Browse the repository at this point in the history
  • Loading branch information
mutdmour committed Sep 22, 2022
1 parent c777016 commit 2bb63fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/editor-ui/src/components/ParameterInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand Down

0 comments on commit 2bb63fb

Please sign in to comment.