This commit is contained in:
Max Brunsfeld
2015-08-21 11:50:54 -07:00
parent 408202729e
commit bb69f1352d
2 changed files with 4 additions and 4 deletions

View File

@@ -99,7 +99,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 (!fs.isFileSync(filePath)) {
return null
}
@@ -115,13 +115,13 @@ require('source-map-support').install({
while ((match = INLINE_SOURCE_MAP_REGEXP.exec(fileData))) {
lastMatch = match
}
if (lastMatch == null){
if (lastMatch == null) {
return null
}
var sourceMappingURL = lastMatch[1]
var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1)
var sourceMap = JSON.parse(new Buffer(rawData, 'base64').toString())
var sourceMap = JSON.parse(new Buffer(rawData, 'base64'))
return {
map: sourceMap,

View File

@@ -28,7 +28,7 @@ exports.getCachePath = function(sourceCode) {
crypto
.createHash('sha1')
.update(sourceCode, 'utf8')
.digest('hex') + ".js"
.digest('hex') + '.js'
)
}