Skip to content

Commit

Permalink
fix: use original source path if no sources (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Mar 30, 2021
1 parent 12ddddb commit 64b2c86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/v8-to-istanbul.js
Expand Up @@ -54,7 +54,7 @@ module.exports = class V8ToIstanbul {
this.sourceTranspiled = new CovSource(rawSource, this.wrapperLength)
} else {
const candidatePath = this.rawSourceMap.sourcemap.sources.length >= 1 ? this.rawSourceMap.sourcemap.sources[0] : this.rawSourceMap.sourcemap.file
this.path = this._resolveSource(this.rawSourceMap, candidatePath)
this.path = this._resolveSource(this.rawSourceMap, candidatePath || this.path)
this.sourceMap = await new SourceMapConsumer(this.rawSourceMap.sourcemap)

let originalRawSource
Expand Down

0 comments on commit 64b2c86

Please sign in to comment.