Skip to content

Commit c74079d

Browse files
authored
Merge pull request #91 from taras/fix/comment-review-const
fix(review): CommentReview redeclares checklist bindings instead of reassigning
2 parents 9c5ab10 + 7bc3392 commit c74079d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎.reviews/components/CommentReview.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,11 @@ for (const pf of pendingFindings) {
242242
});
243243
}
244244

245-
hasChecklist = checklistItems.length > 0;
246-
checklistMd = checklistItems.map(item => {
245+
// Redeclared, not reassigned: bindings from earlier eval blocks arrive in
246+
// later blocks as consts, so assignment throws. A fresh declaration shadows
247+
// the injected binding and its export overrides env for the <Show> below.
248+
const hasChecklist = checklistItems.length > 0;
249+
const checklistMd = checklistItems.map(item => {
247250
const checked = item.status !== "pending" ? "x" : " ";
248251
if (item.status === "applied") {
249252
return `- [${checked}] \`${item.file}:${item.lineNumber}\` (removed)`;

0 commit comments

Comments
 (0)