Fix DiffThunkRange access

This commit fixes lingering array index access that I missed when I
converted getPullRequestEditedDiffRanges() results from tuples to
DiffThunkRange objects.
This commit is contained in:
Chuan-kai Lin 2024-11-21 13:49:36 -08:00
parent f8e782af56
commit 2eea97e7b9
3 changed files with 6 additions and 3 deletions

2
lib/analyze.js generated
View file

@ -287,7 +287,7 @@ extensions:
data:
`;
let data = ranges
.map((range) => ` - ["${range[0]}", ${range[1]}, ${range[2]}]\n`)
.map((range) => ` - ["${range.path}", ${range.startLine}, ${range.endLine}]\n`)
.join("");
if (!data) {
// Ensure that the data extension is not empty, so that a pull request with

File diff suppressed because one or more lines are too long

View file

@ -428,7 +428,10 @@ extensions:
`;
let data = ranges
.map((range) => ` - ["${range[0]}", ${range[1]}, ${range[2]}]\n`)
.map(
(range) =>
` - ["${range.path}", ${range.startLine}, ${range.endLine}]\n`,
)
.join("");
if (!data) {
// Ensure that the data extension is not empty, so that a pull request with