From d9410716d2c39fa4d62b2e1ab2fe1251a5805487 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 1 Sep 2015 16:32:50 -0700 Subject: [PATCH] Don't attempt to use source maps w/ no cache directory This error will only happen when the compile-cache file is compiled twice, which seems to be happening on windows when running specs. This doesn't fix that problem, but prevents further errors from cascading in a confusing way. --- src/compile-cache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compile-cache.js b/src/compile-cache.js index c427097e7..e10bf6803 100644 --- a/src/compile-cache.js +++ b/src/compile-cache.js @@ -108,7 +108,7 @@ require('source-map-support').install({ // source-map-support module, but we've overridden it to read the javascript // code from our cache directory. retrieveSourceMap: function (filePath) { - if (!fs.isFileSync(filePath)) { + if (!cacheDirectory || !fs.isFileSync(filePath)) { return null }