aboutsummaryrefslogtreecommitdiff
path: root/packages/client/src
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-07-18 14:06:32 +0200
committerHampusM <hampus@hampusmat.com>2021-07-18 14:06:32 +0200
commit9684e2dec933f1be80543748f1753761006c3d5f (patch)
tree2d5fcc0d79dd948ffdfab208e8003b83967e6e26 /packages/client/src
parent2e333f01de88217f33ed2fb9ba0c18ed1357419c (diff)
Fixed the bug caused by inproper handling of empty patches
Diffstat (limited to 'packages/client/src')
-rw-r--r--packages/client/src/components/CommitPatch.vue6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/client/src/components/CommitPatch.vue b/packages/client/src/components/CommitPatch.vue
index dca886f..fbc9e3a 100644
--- a/packages/client/src/components/CommitPatch.vue
+++ b/packages/client/src/components/CommitPatch.vue
@@ -19,6 +19,12 @@ export default defineComponent({
]);
}
+ if(!props.patch.hunks) {
+ return () => h("div", { class: "ps-3 pt-3" }, [
+ h("span", "Empty.")
+ ]);
+ }
+
// Array of hunks without the first chunk headers
const all_hunks = props.patch.hunks.map((hunk) => hunk.hunk.split("\n").slice(1).join("\n"));