Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions server/api/registry/license-change/[...pkg].get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export default defineCachedEventHandler(
version === 'latest' ? versions.length - 1 : versions.findIndex(v => v.version === version)

const previousVersionIndex = currentVersionIndex - 1
if (previousVersionIndex < 0) {
return { change }
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
const currentLicense = String(versions[currentVersionIndex]?.license || 'UNKNOWN')
const previousLicense = String(versions[previousVersionIndex]?.license || 'UNKNOWN')

Expand Down
Loading