From 8472ec166932ef68f25aba57d53937964c84726b Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 26 Sep 2013 06:16:16 +0000 Subject: [PATCH] refactor(appcache) addFiles: exports.watch -> watch --- lib/server/appcache.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/server/appcache.js b/lib/server/appcache.js index 7366f2ef..fc16423a 100644 --- a/lib/server/appcache.js +++ b/lib/server/appcache.js @@ -40,7 +40,9 @@ * exports.addFiles([{'http://cdn.jquery/jq.js':'jquery.js'}, 'client.js']); */ exports.addFiles = function(pFileNames) { - var i, n, lName, lCurrentName; + var i, n, lName, lCurrentName, + watch = exports.watch; + /* if a couple files */ if (Util.isArray(pFileNames)) { n = pFilesNames.length; @@ -52,13 +54,13 @@ if (Util.isObject(lCurrentName)) for(lName in lCurrentName) { FallBack_s += lName + ' ' + lCurrentName[lName] + '\n'; - exports.watch(lCurrentName[lName]); + watch(lCurrentName[lName]); } else - exports.watch(pFileNames[i]); + watch(pFileNames[i]); } } else - exports.watch(pFileNames); + watch(pFileNames); };