Explorar el Código

Fix switch value method, make app global

Scott Lahteine hace 9 años
padre
commit
838a22de64
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3
    3
      Marlin/configurator/js/configurator.js

+ 3
- 3
Marlin/configurator/js/configurator.js Ver fichero

@@ -128,7 +128,7 @@ $.fn.extend({
128 128
 });
129 129
 
130 130
 // The app is a singleton
131
-var configuratorApp = (function(){
131
+window.configuratorApp = (function(){
132 132
 
133 133
   // private variables and functions go here
134 134
   var self,
@@ -717,7 +717,7 @@ var configuratorApp = (function(){
717 717
 
718 718
       this.log(result,2);
719 719
 
720
-      return inf.type == 'switch' ? result[inf.val_i] != '//' : result[inf.val_i];
720
+      return (inf.type == 'switch') ? (result[inf.val_i] === undefined || result[inf.val_i].trim() != '//') : result[inf.val_i];
721 721
     },
722 722
 
723 723
     /**
@@ -1106,6 +1106,6 @@ var configuratorApp = (function(){
1106 1106
 })();
1107 1107
 
1108 1108
 // Typically the app would be in its own file, but this would be here
1109
-configuratorApp.init();
1109
+window.configuratorApp.init();
1110 1110
 
1111 1111
 });

Loading…
Cancelar
Guardar