Skip to content

Commit

Permalink
check if it includes only the slug
Browse files Browse the repository at this point in the history
  • Loading branch information
otbe committed Jan 13, 2025
1 parent 232977f commit dbfd8b1
Showing 1 changed file with 1 addition and 1 deletion.
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 dbfd8b1

Please sign in to comment.