mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
🐛 Fix issue with displaying parameter with root level reference
This commit is contained in:
@@ -90,7 +90,7 @@ import { genericHelpers } from '@/components/mixins/genericHelpers';
|
||||
import { workflowHelpers } from '@/components/mixins/workflowHelpers';
|
||||
import ParameterInputFull from '@/components/ParameterInputFull.vue';
|
||||
|
||||
import { get } from 'lodash';
|
||||
import { get, set } from 'lodash';
|
||||
|
||||
import mixins from 'vue-typed-mixins';
|
||||
|
||||
@@ -172,6 +172,7 @@ export default mixins(
|
||||
const resolveKeys = Object.keys(rawValues);
|
||||
let key: string;
|
||||
let i = 0;
|
||||
let parameterGotResolved = false;
|
||||
do {
|
||||
key = resolveKeys.shift() as string;
|
||||
if (typeof rawValues[key] === 'string' && rawValues[key].charAt(0) === '=') {
|
||||
@@ -183,6 +184,7 @@ export default mixins(
|
||||
} else {
|
||||
// Contains probably no expression with a missing parameter so resolve
|
||||
nodeValues[key] = this.resolveExpression(rawValues[key], nodeValues) as NodeParameterValue;
|
||||
parameterGotResolved = true;
|
||||
}
|
||||
} else {
|
||||
// Does not contain an expression, add directly
|
||||
@@ -195,7 +197,17 @@ export default mixins(
|
||||
}
|
||||
} while(resolveKeys.length !== 0);
|
||||
|
||||
return this.displayParameter(nodeValues, parameter, '');
|
||||
if (parameterGotResolved === true) {
|
||||
if (this.path) {
|
||||
rawValues = JSON.parse(JSON.stringify(this.nodeValues));
|
||||
set(rawValues, this.path, nodeValues);
|
||||
return this.displayParameter(rawValues, parameter, this.path);
|
||||
} else {
|
||||
return this.displayParameter(nodeValues, parameter, '');
|
||||
}
|
||||
}
|
||||
|
||||
return this.displayParameter(this.nodeValues, parameter, this.path);
|
||||
},
|
||||
valueChanged (parameterData: IUpdateInformation): void {
|
||||
this.$emit('valueChanged', parameterData);
|
||||
|
||||
Reference in New Issue
Block a user