Don't change option value if new value is blank
This commit is contained in:
parent
f51ee76c72
commit
6f5018d45e
@ -293,7 +293,9 @@ class HTMLIngredient {
|
|||||||
const op = el.parentNode.parentNode;
|
const op = el.parentNode.parentNode;
|
||||||
const target = op.querySelectorAll(".arg")[this.target];
|
const target = op.querySelectorAll(".arg")[this.target];
|
||||||
|
|
||||||
target.value = el.childNodes[el.selectedIndex].getAttribute("populate-value");
|
const popVal = el.childNodes[el.selectedIndex].getAttribute("populate-value");
|
||||||
|
if (popVal !== "") target.value = popVal;
|
||||||
|
|
||||||
const evt = new Event("change");
|
const evt = new Event("change");
|
||||||
target.dispatchEvent(evt);
|
target.dispatchEvent(evt);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user