Skip to content

Commit 90a36a9

Browse files
committed
fix(content): 🐛 body为空时存在多个空白行
下次不敢出现这种bug了
1 parent 164bf86 commit 90a36a9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/components/home.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,8 @@ const emojiOptions = computed(() => {
232232
})
233233
234234
const content = computed(() => {
235-
const commit =
236-
String.raw`${type.value}(${scope.value ?? ''}): ${emoji.value} ${subject.value}
237-
238-
${body.value}
239-
240-
`;
235+
let commit = `${type.value}(${scope.value ?? ''}): ${emoji.value} ${subject.value}`;
236+
commit += body.value && `\r\n\r\n${body.value}\r\n\r\n`
241237
return commit;
242238
});
243239

0 commit comments

Comments
 (0)