X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=js%2Fajax-loader.js;h=275b5f65f9d0ade451637be76e06d448ec9a12f2;hp=0d9ee2e10653414358524d10fefaefb3e3d2728b;hb=10c08181e41654e70fc77f8f5f956008241d34c2;hpb=eecbb82b02ddf3e79b235ba429782f5e465795eb diff --git a/js/ajax-loader.js b/js/ajax-loader.js index 0d9ee2e106..275b5f65f9 100644 --- a/js/ajax-loader.js +++ b/js/ajax-loader.js @@ -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