From 48a8f7e949573a4fe8b9ba48119aa67392ede356 Mon Sep 17 00:00:00 2001 From: Chris Grigg Date: Tue, 2 May 2023 17:48:03 -0400 Subject: [PATCH] Fix str.match is not a function error --- lib/build-commit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/build-commit.js b/lib/build-commit.js index 84650f4..11ab4a0 100644 --- a/lib/build-commit.js +++ b/lib/build-commit.js @@ -79,7 +79,7 @@ module.exports = (answers, config) => { addSubject(answers.subject.slice(0, config.subjectLimit)); // Wrap these lines at 100 characters - let body = wrap(answers.body, wrapOptions) || ''; + let body = (answers.body ? wrap(answers.body, wrapOptions) : '') || ''; body = addBreaklinesIfNeeded(body, config.breaklineChar); const breaking = wrap(answers.breaking, wrapOptions);