Browse Source

Fix switch value method, make app global

Scott Lahteine 9 years ago
parent
commit
838a22de64
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/configurator/js/configurator.js

+ 3
- 3
Marlin/configurator/js/configurator.js View File

128
 });
128
 });
129
 
129
 
130
 // The app is a singleton
130
 // The app is a singleton
131
-var configuratorApp = (function(){
131
+window.configuratorApp = (function(){
132
 
132
 
133
   // private variables and functions go here
133
   // private variables and functions go here
134
   var self,
134
   var self,
717
 
717
 
718
       this.log(result,2);
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
 })();
1106
 })();
1107
 
1107
 
1108
 // Typically the app would be in its own file, but this would be here
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…
Cancel
Save