🐛 Fix bug that Option with value 0 could not be selected

This commit is contained in:
Jan Oberhauser 2019-12-01 00:24:25 +01:00
parent 2a802256ca
commit b4c3642dcc

View file

@ -321,8 +321,8 @@ export function getNodeParameters(nodePropertiesArray: INodeProperties[], nodeVa
if (returnDefaults === true) { if (returnDefaults === true) {
// Set also when it has the default value // Set also when it has the default value
if (['boolean', 'number'].includes(nodeProperties.type)) { if (['boolean', 'number', 'options'].includes(nodeProperties.type)) {
// Boolean and numbers are special as false and 0 are valid values // Boolean, numbers and options are special as false and 0 are valid values
// and should not be replaced with default value // and should not be replaced with default value
nodeParameters[nodeProperties.name] = nodeValues[nodeProperties.name] !== undefined ? nodeValues[nodeProperties.name] : nodeProperties.default; nodeParameters[nodeProperties.name] = nodeValues[nodeProperties.name] !== undefined ? nodeValues[nodeProperties.name] : nodeProperties.default;
} else { } else {