Skip to content

Commit 0ed6966

Browse files
docs: add comment explaining Strapi 5 publishedAt behavior
Added clarifying comment that publishedAt is always set in Strapi 5 even when draftAndPublish is disabled, with link to migration docs.
1 parent a1c6e8a commit 0ed6966

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/services/meilisearch/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ export default ({ strapi }) => {
237237
if (entriesQuery.status === 'draft') {
238238
return entries
239239
} else {
240+
// In strapi 5, publishedAt is always set even draftAndPublish is disabled
241+
// More information: https://docs.strapi.io/cms/migration/v4-to-v5/breaking-changes/publishedat-always-set-when-dandp-disabled
240242
return entries.filter(
241243
entry =>
242244
!(entry?.publishedAt === undefined || entry?.publishedAt === null),

0 commit comments

Comments
 (0)