Skip to content

Commit 887d583

Browse files
committed
fix: issue causing TypeError: Cannot read properties of null (reading 'publishedAt')
1 parent c84380a commit 887d583

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/services/meilisearch/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ module.exports = ({ strapi }) => {
215215
if (entriesQuery.publicationState === 'preview') {
216216
return entries
217217
} else {
218-
return entries.filter(entry => !(entry.publishedAt === null))
218+
return entries.filter(entry => !(entry?.publishedAt === null))
219219
}
220220
},
221221

0 commit comments

Comments
 (0)