Skip to content

Commit a7bbda1

Browse files
committed
Ignore sourcemaps names
1 parent c8824e4 commit a7bbda1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/fromStringWithSourceMap.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ module.exports = function fromStringWithSourceMap(code, map) {
6262
var linePosition = currentLine;
6363
}
6464

65-
if(mapping.rest && mapping.rest[0] === ",") {
66-
mapping.rest = mapping.rest.substr(1);
65+
if(mapping.rest) {
66+
var next = mapping.rest.indexOf(',');
67+
mapping.rest = next === -1 ? '' : mapping.rest.substr(next);
6768
}
6869

6970
if(!ignore) {

0 commit comments

Comments
 (0)