Just offset by the initial quote character
... dividing by two yields bogus offsets for multi-character adjustments, leading to invalid sourcemaps with negative column positions
This commit is contained in:
parent
9b38b16701
commit
fe819011e2
|
|
@ -315,7 +315,7 @@ function OutputStream(options) {
|
|||
|
||||
// Fixes offsets for quoted keys of object literals
|
||||
remainder = token.endpos - token.pos - tokenName.length;
|
||||
offset = remainder === 0 ? 0 : remainder/2;
|
||||
offset = remainder === 0 ? 0 : 1;
|
||||
}
|
||||
|
||||
options.source_map.add(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user