mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
21304a695c
commit
d695cf392e
@ -918,7 +918,7 @@
|
||||
if ((opt.options && opt.hasValue !== true) || opt.hasValue === false) {
|
||||
if (this.oldValues.hasOwnProperty(opt.value)) {
|
||||
this.input.val(this.oldValues[opt.value]);
|
||||
} else {
|
||||
} else if (opt.options) {
|
||||
// No old value for the option type.
|
||||
// It is possible code has called 'value' then 'type'
|
||||
// to set the selected option. This is what the Inject/Switch/Change
|
||||
@ -936,6 +936,8 @@
|
||||
this.input.val("");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.input.val(opt.default||"")
|
||||
}
|
||||
} else {
|
||||
this.input.val(this.oldValues.hasOwnProperty("_")?this.oldValues["_"]:(opt.default||""))
|
||||
|
Loading…
Reference in New Issue
Block a user