diff --git a/js/amber.js b/js/amber.js index d417222b3..ef68378bd 100644 --- a/js/amber.js +++ b/js/amber.js @@ -192,10 +192,11 @@ amber = (function() { function loadNextJS() { loadJS(jsToLoad[0], function(){ - jsToLoad.shift(); - if (jsToLoad.length > 0) - loadNextJS(); - }); + jsToLoad.shift(); + if (jsToLoad.length > 0) { + loadNextJS(); + } + }); }; function loadJSViaScriptTag(url, callback) {