Skip to content

Commit ddd6fd6

Browse files
Merge #597
597: fix: issue causing TypeError: Cannot read properties of null (reading… r=bidoubiwa a=Kazdan1994 … 'publishedAt') # Pull Request ## Related issue Fixes #<issue_number> ## What does this PR do? - fix an issue in `server/services/meilisearch/config.js` TypeError: Cannot read properties of null (reading 'publishedAt') at strapi-plugin-meilisearch/server/services/meilisearch/config.js:209:46 make change on this line `return entries.filter(entry => !(entry?.publishedAt === null))` to remove the error ## PR checklist Please check if your PR fulfills the following requirements: - [ ] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [ ] Have you read the contributing guidelines? - [ ] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! Co-authored-by: arthur.jacquemin <[email protected]>
2 parents d112a45 + 887d583 commit ddd6fd6

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)