diff --git a/UI/Input.js b/UI/Input.js index aa0bde5..3cd7573 100644 --- a/UI/Input.js +++ b/UI/Input.js @@ -30,19 +30,19 @@ input.addEventListener('change', function changeBind(event) { /* Handle remote datalist/autocomplete input element */ let listId, list; - if((listId = this.getAttribute('list')) !== 'undefined' && (list = document.getElementById(listId)).getAttribute('data-list-src') !== 'undefined') { + if(typeof (listId = this.getAttribute('list')) !== 'undefined' && (list = document.getElementById(listId)).getAttribute('data-list-src') !== 'undefined') { self.addRemoteDatalistOptions(this, list); } /* Handle html defined functions */ let change; - if((change = this.getAttribute('data-change-func')) !== 'undefined') { + if(typeof (change = this.getAttribute('data-change-func')) !== 'undefined') { change(this); } /* Handle pre-defined dynamic change events */ let ref; - if(ref = this.getAttribute('data-ref') !== 'undefined') { + if(typeof (ref = this.getAttribute('data-ref')) !== 'undefined') { let e = document.getElementById(ref); switch(e.tagName) { @@ -55,7 +55,7 @@ }); let dataButton; - if((dataButton = input.getAttribute('data-button')) !== 'undefined') { + if(typeof (dataButton = input.getAttribute('data-button')) !== 'undefined') { this.app.inputManager.getKeyboardManager().bind(input, 13, function() { document.getElementById(dataButton).click(); }); diff --git a/autoloader.js b/autoloader.js index e434864..2905474 100644 --- a/autoloader.js +++ b/autoloader.js @@ -47,7 +47,7 @@ current = jsOMS; for(let i = 0; i < length; i++) { - if(current[paths[i]] === 'undefined') { + if(typeof current[paths[i]] === 'undefined') { current[paths[i]] = {}; }