Skip to content

Commit

Permalink
Merge branch 'inukshuk-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
blakevanlan committed Apr 10, 2016
2 parents 13f4e5b + ef19a36 commit 6a8bc12
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/assets.js
Expand Up @@ -83,7 +83,7 @@ Assets.prototype.serveAsset = function (req, res, next) {
}

var parts = parse(path);
var asset, assetName;
var asset, assetName, sourceMap;

try {
asset = this.getAssetByPath(parts.path, { bundle: this.options.build });
Expand All @@ -94,9 +94,10 @@ Assets.prototype.serveAsset = function (req, res, next) {
if (!asset || !asset.sourceMap) {
return next();
}
res.setHeader("Content-Length", asset.sourceMap.length);
sourceMap = asset.sourceMap.toString();
res.setHeader("Content-Length", sourceMap.length);
res.setHeader("Content-Type", "application/json");
return res.end(asset.sourceMap);
return res.end(sourceMap);
}

if (!asset || (this.options.fingerprinting && asset.digest !== parts.fingerprint)) {
Expand Down

0 comments on commit 6a8bc12

Please sign in to comment.