mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(editor): Allow switch to Fixed for boolean and number parameters with invalid expressions (#12948)
This commit is contained in:
@@ -908,11 +908,16 @@ async function optionSelected(command: string) {
|
||||
if (isResourceLocatorParameter.value && isResourceLocatorValue(props.modelValue)) {
|
||||
valueChanged({ __rl: true, value, mode: props.modelValue.mode });
|
||||
} else {
|
||||
let newValue = typeof value !== 'undefined' ? value : null;
|
||||
let newValue: NodeParameterValueType | {} = typeof value !== 'undefined' ? value : null;
|
||||
|
||||
if (props.parameter.type === 'string') {
|
||||
// Strip the '=' from the beginning
|
||||
newValue = modelValueString.value ? modelValueString.value.toString().substring(1) : null;
|
||||
} else if (newValue === null) {
|
||||
// Invalid expressions land here
|
||||
if (['number', 'boolean'].includes(props.parameter.type)) {
|
||||
newValue = props.parameter.default;
|
||||
}
|
||||
}
|
||||
valueChanged(newValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user