From ccb6b505895b01a956c659d8f7276c66b70717d9 Mon Sep 17 00:00:00 2001 From: John Caliman Date: Wed, 21 Jan 2015 00:24:18 +0200 Subject: [PATCH] fix bug --- lib/assets-compiler.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/assets-compiler.js b/lib/assets-compiler.js index dc3c711..4767db9 100644 --- a/lib/assets-compiler.js +++ b/lib/assets-compiler.js @@ -107,11 +107,12 @@ AssetsCompiler.prototype.handleRequest = function(req, res, next) { , folder = match[1] , fileName = match[2] , extension = match[3] - , compiler = this.getCompiler(extension) - , sourceFolder = folder.replace(self.publicDir+compiler.destDir, self.assetDir+compiler.sourceDir) - , source = sourceFolder + '/' + fileName + '.' + compiler.sourceExtension; + , compiler = this.getCompiler(extension); if(compiler) { + var sourceFolder = folder.replace(self.publicDir+compiler.destDir, self.assetDir+compiler.sourceDir) + , source = sourceFolder + '/' + fileName + '.' + compiler.sourceExtension; + this.compileAsset(source, dest, compiler, function(err) { if (err) { throw new Error('Asset compilation failed: ' + err);