Skip to content

Commit 4b06882

Browse files
committed
build: omit contributors section in case of empty array
1 parent c6dc95a commit 4b06882

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/node_modules/@stdlib/_tools/changelog/generate/lib/format_contributors.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ function formatContributor( contributor ) {
100100
*/
101101
function formatContributors( commits ) {
102102
var contributors = extractContributors( commits );
103-
var out = sectionStart( 'contributors' );
103+
var out;
104+
if ( contributors.length === 0 ) {
105+
return '';
106+
}
107+
out = sectionStart( 'contributors' );
104108
out += heading( 'Contributors', 3 );
105109
if ( contributors.length === 1 ) {
106110
out += 'A total of 1 person contributed to this release. Thank you to this contributor:\n\n';

0 commit comments

Comments
 (0)