浏览代码

Merge branch 'j433866-load-regex-fix'

j433866 6 年之前
父节点
当前提交
a271eaabd0
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/web/HTMLIngredient.mjs

+ 3 - 1
src/web/HTMLIngredient.mjs

@@ -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);