From 1423afbc660fc42e68fe4cb6779454d9cde2b955 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 31 Jan 2014 11:08:03 -0500 Subject: [PATCH] refactor(client) initModules --- lib/client.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/client.js b/lib/client.js index f941401e..b8d21e30 100644 --- a/lib/client.js +++ b/lib/client.js @@ -138,7 +138,7 @@ var Util, DOM, CloudFunc; Util.loadOnLoad([ initModules, baseInit, - Util.retFunc(CloudCmd.route, location.hash), + CloudCmd.route.bind(null, location.hash), ]); }, lFunc = function(pCallBack) { @@ -220,14 +220,13 @@ var Util, DOM, CloudFunc; storageObj = Util.findObjByNameInArr(pModules, STORAGE), mod = Util.getNamesFromObjArray(storageObj); - for (i = 0, n = lMod.length; i < n; i++) { + for (i = 0, n = mod.length; i < n; i++) { name = mod[i], - path = STORAGE + '/_' + lName.toLowerCase(); + path = STORAGE + '/_' + name.toLowerCase(); - load(lName, lPath); + load(name, path); } - Util.exec(pCallBack); });