mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix: displayOptions not getting value of RLC (#4460)
* fix: use `value` of RLC in `displayOptions` * fix: add `__rl` to RLC default value if it doesn't have it
This commit is contained in:
parent
41e6489b75
commit
3a1fa09108
|
@ -292,6 +292,10 @@ export function displayParameter(
|
|||
value = get(nodeValues, propertyName);
|
||||
}
|
||||
|
||||
if (value && typeof value === 'object' && '__rl' in value && value.__rl) {
|
||||
value = value.value;
|
||||
}
|
||||
|
||||
values.length = 0;
|
||||
if (!Array.isArray(value)) {
|
||||
values.push(value);
|
||||
|
@ -325,6 +329,10 @@ export function displayParameter(
|
|||
value = get(nodeValues, propertyName);
|
||||
}
|
||||
|
||||
if (value && typeof value === 'object' && '__rl' in value && value.__rl) {
|
||||
value = value.value;
|
||||
}
|
||||
|
||||
values.length = 0;
|
||||
if (!Array.isArray(value)) {
|
||||
values.push(value);
|
||||
|
@ -620,6 +628,14 @@ export function getNodeParameters(
|
|||
nodeValues[nodeProperties.name] !== undefined
|
||||
? nodeValues[nodeProperties.name]
|
||||
: nodeProperties.default;
|
||||
} else if (
|
||||
nodeProperties.type === 'resourceLocator' &&
|
||||
typeof nodeProperties.default === 'object'
|
||||
) {
|
||||
nodeParameters[nodeProperties.name] =
|
||||
nodeValues[nodeProperties.name] !== undefined
|
||||
? nodeValues[nodeProperties.name]
|
||||
: { __rl: true, ...nodeProperties.default };
|
||||
} else {
|
||||
nodeParameters[nodeProperties.name] =
|
||||
nodeValues[nodeProperties.name] || nodeProperties.default;
|
||||
|
|
Loading…
Reference in a new issue