Skip to content

Commit

Permalink
Check if slug is included within slashes (#1094)
Browse files Browse the repository at this point in the history
* check if it includes only the slug

* Create tasty-goats-jump.md

---------

Co-authored-by: David Boyne <[email protected]>
  • Loading branch information
otbe and boyney123 authored Jan 14, 2025
1 parent 0dda8b3 commit be3a5c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tasty-goats-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@eventcatalog/core": patch
---

fix(core): fixed issue where changelog page would show the wrong information
2 changes: 1 addition & 1 deletion eventcatalog/src/utils/collections/changelogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const getChangeLogs = async (item: CollectionEntry<CollectionTypes>): Pro

// Get all logs for collection type and filter by given collection
const logs = await getCollection('changelogs', (log) => {
return log.id.includes(`${collection}/`) && log.slug.includes(slug);
return log.id.includes(`${collection}/`) && log.slug.includes('/' + slug + '/');
});

const hydratedLogs = logs.map((log) => {
Expand Down

0 comments on commit be3a5c1

Please sign in to comment.