diff options
author | HampusM <hampus@hampusmat.com> | 2021-06-07 21:12:15 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-06-07 21:12:15 +0200 |
commit | 3b2dd08b8e5136431288ce1d34a019733d569d89 (patch) | |
tree | 7f1d8b4a776b61067c23a535c89687c6170e73f5 /packages/client | |
parent | 785f3ac0ee4308f8cd3e66b30d1f72309d2d624f (diff) |
Fixed the CommitPatch component's check for whether a hunk line is new or deleted
Diffstat (limited to 'packages/client')
-rw-r--r-- | packages/client/src/components/CommitPatch.vue | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/client/src/components/CommitPatch.vue b/packages/client/src/components/CommitPatch.vue index 0734b1e..cf15eda 100644 --- a/packages/client/src/components/CommitPatch.vue +++ b/packages/client/src/components/CommitPatch.vue @@ -67,12 +67,12 @@ export default { let second_td; let third_td; - if(hunk.new.includes(line_index)) { + if(hunk.new_lines.includes(line_index)) { first_td = h("td", ""); second_td = h("td", { class: "line-highlight-new", "patch-line-col-unsel": Number(hunk.new_start) + line_index - new_offset }); third_td = h("td", { class: "line-new", "patch-line-col-unsel": "+" }); deleted_offset++; - } else if(hunk.deleted.includes(line_index)) { + } else if(hunk.deleted_lines.includes(line_index)) { first_td = h("td", { "patch-line-col-unsel": Number(hunk.old_start) + line_index - deleted_offset }); second_td = h("td", { class: "line-highlight-deleted" }); third_td = h("td", { class: "line-deleted", "patch-line-col-unsel": "-" }); |