]> git.mxchange.org Git - mailer.git/blobdiff - js/ajax-loader.js
Structural change + jQuery upgrade:
[mailer.git] / js / ajax-loader.js
index 0d9ee2e10653414358524d10fefaefb3e3d2728b..275b5f65f9d0ade451637be76e06d448ec9a12f2 100644 (file)
@@ -42,7 +42,7 @@ function loadScriptsLocked () {
 // Loads more JavaScript resources
 function loadScripts (resources) {
        // Abort here if resources is not defined
-       if (resources == undefined) {
+       if (typeof(resources) === 'undefined') {
                // This is really bad ...
                throw new 'loadScripts() called with no resources (JavaScript files) to load!';
        } // END - if
@@ -56,7 +56,7 @@ function loadScripts (resources) {
        // Begin the loop for all JavaScript files
        for (var i = 0; i < resources.length; i++) {
                // Is the script set?
-               if (resources[i] == undefined) {
+               if (typeof(resources[i]) === 'undefined') {
                        // Array element is missing, which means someone mades a boo boo ...
                        throw new ('resources[' + i + '] not set. Please fix your array.');
                } // END - if