Skip to content

Returned sources are broken if the sourceRoot contains hyphens #219

@rakeshpai

Description

@rakeshpai

Found a weird bug where stuff after a hyphen in the sourceRoot gets snipped off when determining the sources in a consumer. I think the code below will show it best.

var smc = new SourceMapConsumer(map);
console.log(smc.sourceRoot); // null
console.log(smc.sources); // Prints a list of sources. Say ["/script.js"]. Everything's fine so far.

smc.sourceRoot = "http://x-y.com";
console.log(smc.sources); // Prints ["http://x/script.js"]. The "-y.com" disappears

Let me know if I can help with more details.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions