Fix undesired normalization of internal structure
It's undesired because it is used in other places to check if a comment is in the same place. Change-Id: Ic674acd307dedc1573aae61decaefec2f2b4234b
This commit is contained in:
@@ -167,6 +167,9 @@
|
|||||||
const ranges = this.get(['_rangesMap', side, lineNum]) || [];
|
const ranges = this.get(['_rangesMap', side, lineNum]) || [];
|
||||||
return ranges
|
return ranges
|
||||||
.map(range => {
|
.map(range => {
|
||||||
|
// Make a copy, so that the normalization below does not mess with
|
||||||
|
// our map.
|
||||||
|
range = Object.assign({}, range);
|
||||||
range.end = range.end === -1 ? line.text.length : range.end;
|
range.end = range.end === -1 ? line.text.length : range.end;
|
||||||
|
|
||||||
// Normalize invalid ranges where the start is after the end but the
|
// Normalize invalid ranges where the start is after the end but the
|
||||||
|
|||||||
Reference in New Issue
Block a user