Skip to content

Commit

Permalink
Fix: handle no file attribute on rawSourceMap
Browse files Browse the repository at this point in the history
Fixes #168
  • Loading branch information
cexbrayat committed May 25, 2018
1 parent 1b240d3 commit f96a35d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CoverageTransformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default class CoverageTransformer {
origSourceFilename = rawSourceMap.sources[0];

if (origSourceFilename && path.extname(origSourceFilename) !== '' && rawSourceMap.sources.length === 1) {
origFileName = rawSourceMap.file;
origFileName = rawSourceMap.file || rawSourceMap.sources[0];
fileName = filePath.replace(path.extname(origFileName), path.extname(origSourceFilename));
rawSourceMap.file = fileName;
rawSourceMap.sources = [fileName];
Expand Down

0 comments on commit f96a35d

Please sign in to comment.