Skip to content

Commit

Permalink
Add another null guard in changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich committed Nov 7, 2024
1 parent 4a4b8b3 commit 4a0c3cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generator/templates/changelog.mdx.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
tags: [
"api" + apiVersion,
hasBreakingChanges ? "breaking" : undefined,
...(new Set(changelog.map(l => getOperationById(spec, l.operationId).operation.tags[0])))
...(new Set(changelog.map(l => getOperationById(spec, l.operationId)?.operation.tags[0]).filter(t => t !== undefined)))
].filter(s => s !== undefined)
}) %>
---
Expand Down Expand Up @@ -57,7 +57,7 @@ The following API endpoints have changed:
<% for ([operationId, changes] of groupedChangelog.entries()) { %>
### Changes in "<%- canonicalizeTitle(getOperationById(spec, operationId).operation.summary) %>"
### Changes in "<%- canonicalizeTitle(getOperationById(spec, operationId)?.operation.summary) ?? operationId %>"
<% for (change of changes) { %>
- <% if (change.level === 3) { %>⚠️ **Breaking:** <% } %><%- change.text %>
Expand Down

0 comments on commit 4a0c3cc

Please sign in to comment.