From: Alan Knowles Date: Wed, 23 Jun 2010 05:10:01 +0000 (+0800) Subject: Roo/Document.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=96fa07eeaea7f68fa33649735a4900fdae645797;p=roojs1 Roo/Document.js --- diff --git a/Roo/Document.js b/Roo/Document.js index dcabeb6399..9623849923 100644 --- a/Roo/Document.js +++ b/Roo/Document.js @@ -165,7 +165,7 @@ Roo.extend(Roo.Document, Roo.util.Observable, { build : function(parent, onComplete) { - + onComplete = onComplete || Roo.emptyFn; var _this = this; var cmp = function(a,b) { return String(a).toUpperCase() > String(b).toUpperCase() ? 1 : -1; @@ -200,10 +200,7 @@ Roo.extend(Roo.Document, Roo.util.Observable, { //console.log(mods); //return; if (!mods.length) { - if (onComplete) { - onComplete.call(this); - } - return; + return onComplete.call(this); } // flash it up as modal - so we store the mask!? Roo.MessageBox.show({ title: 'loading' }); @@ -221,10 +218,7 @@ Roo.extend(Roo.Document, Roo.util.Observable, { var progressRun = function() { n++; if (n >= mods.length) { - if (onComplete) { - onComplete.call(this); - } - return; + return onComplete.call(this); } var m = mods[n];