فهرست منبع

Fix option defaults and compile message formatting

n1474335 8 سال پیش
والد
کامیت
ad18d84f14
2فایلهای تغییر یافته به همراه6 افزوده شده و 3 حذف شده
  1. 1 1
      .travis.yml
  2. 5 2
      src/web/OptionsWaiter.js

+ 1 - 1
.travis.yml

@@ -9,7 +9,7 @@ script:
   - grunt test
   - grunt docs
   - grunt node
-  - grunt prod --msg="$COMPILE_MSG"
+  - grunt prod --msg=$COMPILE_MSG
 before_deploy:
   - grunt copy:ghPages
 deploy:

+ 5 - 2
src/web/OptionsWaiter.js

@@ -43,8 +43,11 @@ OptionsWaiter.prototype.load = function(options) {
 
     const selects = document.querySelectorAll("#options-body select");
     for (i = 0; i < selects.length; i++) {
-        selects[i].value = this.app.options[selects[i].getAttribute("option")];
-        selects[i].dispatchEvent(new CustomEvent("change", {bubbles: true}));
+        const val = this.app.options[selects[i].getAttribute("option")];
+        if (val) {
+            selects[i].value = val;
+            selects[i].dispatchEvent(new CustomEvent("change", {bubbles: true}));
+        }
     }
 };