Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
fix: πŸ› do not format body as undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jan 20, 2020
1 parent 99238c2 commit 28d6e77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/formatCommitMessage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable complexity */

const wrap = require('word-wrap');

const MAX_LINE_WIDTH = 72;
Expand Down Expand Up @@ -38,7 +40,7 @@ const formatCommitMessage = (state) => {
const affectsLine = makeAffectsLine(answers);

// Wrap these lines at MAX_LINE_WIDTH character
const body = wrap(answers.body + affectsLine, wrapOptions);
const body = wrap((answers.body || '') + affectsLine, wrapOptions);
const breaking = wrap(answers.breaking, wrapOptions);
const issues = wrap(answers.issues, wrapOptions);

Expand Down

0 comments on commit 28d6e77

Please sign in to comment.