Skip to content

Commit

Permalink
fix: dont overwrite sources array if there is more than one source (#120
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mattlewis92 authored and jdonaghue committed Jan 30, 2017
1 parent 53e89b8 commit 93429a5
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 @@ -133,7 +133,7 @@ export default class CoverageTransformer {
if (sourceMap.sourcesContent) {
origSourceFilename = rawSourceMap.sources[0];

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

0 comments on commit 93429a5

Please sign in to comment.