From 92a8c81fbed0cae423fbd84d3e64bc4086fd30af Mon Sep 17 00:00:00 2001 From: ywong Date: Wed, 31 May 2017 09:47:44 +1000 Subject: [PATCH] fix(preprocessor): renamed handeFile to readFileCallback --- lib/preprocessor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/preprocessor.js b/lib/preprocessor.js index 0101c9bb6..1c47849f4 100644 --- a/lib/preprocessor.js +++ b/lib/preprocessor.js @@ -77,13 +77,13 @@ var createPreprocessor = function (config, basePath, injector) { patterns = Object.keys(config) var retryCount = 0 var maxRetries = 3 - function handleFile (err, buffer) { + function readFileCallback (err, buffer) { if (err) { log.warn(err) if (retryCount < maxRetries) { retryCount++ log.warn('retrying ' + retryCount) - fs.readFile(file.originalPath, handleFile) + fs.readFile(file.originalPath, readFileCallback) return } else { throw err @@ -131,7 +131,7 @@ var createPreprocessor = function (config, basePath, injector) { nextPreprocessor(null, thisFileIsBinary ? buffer : buffer.toString()) }) } - return fs.readFile(file.originalPath, handleFile) + return fs.readFile(file.originalPath, readFileCallback) } } createPreprocessor.$inject = ['config.preprocessors', 'config.basePath', 'injector']