Skip to content

Commit 93429a5

Browse files
mattlewis92jdonaghue
authored andcommitted
fix: dont overwrite sources array if there is more than one source (#120)
1 parent 53e89b8 commit 93429a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CoverageTransformer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export default class CoverageTransformer {
133133
if (sourceMap.sourcesContent) {
134134
origSourceFilename = rawSourceMap.sources[0];
135135

136-
if (origSourceFilename && path.extname(origSourceFilename) !== '') {
136+
if (origSourceFilename && path.extname(origSourceFilename) !== '' && rawSourceMap.sources.length === 1) {
137137
origFileName = rawSourceMap.file;
138138
fileName = filePath.replace(path.extname(origFileName), path.extname(origSourceFilename));
139139
rawSourceMap.file = fileName;

0 commit comments

Comments
 (0)