Skip to content

Commit

Permalink
fix: remove scheme from paths before joining (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Oct 24, 2019
1 parent d6bd85a commit 10612fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/v8-to-istanbul.js
Expand Up @@ -49,9 +49,9 @@ module.exports = class V8ToIstanbul {
if (rawSourceMap.sourcemap.sourceRoot && isAbsolute(rawSourceMap.sourcemap.sourceRoot)) {
// TODO: we should also make source-root work with relative paths, but this needs
// to be combined with the relativeTo logic which takes into account process.cwd().
this.path = join(rawSourceMap.sourcemap.sourceRoot, rawSourceMap.sourcemap.sources[0])
this.path = join(rawSourceMap.sourcemap.sourceRoot.replace('file://', ''), rawSourceMap.sourcemap.sources[0].replace('file://', ''))
} else {
this.path = relativeTo(rawSourceMap.sourcemap.sources[0], this.path)
this.path = relativeTo(rawSourceMap.sourcemap.sources[0].replace('file://', ''), this.path)
}
this.sourceMap = await new SourceMapConsumer(rawSourceMap.sourcemap)

Expand Down

0 comments on commit 10612fa

Please sign in to comment.