Skip to content

Commit b8d988b

Browse files
committed
fix: handle license as string or object type
1 parent 8216116 commit b8d988b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

server/utils/markdown.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ export function generatePackageMarkdown(options: PackageMarkdownOptions): string
141141
metaParts.push(`**Version:** ${version.version}`)
142142

143143
if (pkg.license) {
144-
metaParts.push(`**License:** ${escapeMarkdown(pkg.license)}`)
144+
const licenseText = typeof pkg.license === 'string' ? pkg.license : pkg.license.type
145+
metaParts.push(`**License:** ${escapeMarkdown(licenseText)}`)
145146
}
146147

147148
if (pkg.time?.modified) {

0 commit comments

Comments
 (0)