Fixed a potential exception in Gulpfile when asset group output doesn't exist.

This commit is contained in:
Daniel Stolt
2015-09-19 22:20:29 +02:00
parent 52e7fd12b1
commit 7278c0286f

View File

@@ -105,7 +105,7 @@ function createAssetGroupTask(assetGroup, doRebuild) {
if (doConcat && !doRebuild) {
// Force a rebuild of this asset group is the asset manifest file itself is newer than the output.
var assetManifestStats = fs.statSync(assetGroup.manifestPath);
var outputStats = fs.statSync(assetGroup.outputPath);
var outputStats = fs.existsSync(assetGroup.outputPath) ? fs.statSync(assetGroup.outputPath) : null;
doRebuild = !outputStats || assetManifestStats.mtime > outputStats.mtime;
}
switch (outputExt) {