Skip to content

Commit

Permalink
chore(client): gracefully deal with null licenseText
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Oct 1, 2024
1 parent 5cc41c9 commit 01eec0f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ const copyrightRegex = /Copyright.*\n/;

// REUSE-IgnoreStart
function extractCopyright(pkg) {
const copyrights = pkg.licenseText.match(copyrightRegex);
if (copyrights !== null) {
return copyrights.join("");
if (pkg.licenseText !== null) {
const copyrights = pkg.licenseText.match(copyrightRegex);
if (copyrights !== null) {
return copyrights.join("");
}
}
return `Copyright ${pkg.author}\n`;
}
Expand Down

0 comments on commit 01eec0f

Please sign in to comment.